Cayenne can't find obj entity class?

From: Denis Haskin (Deni..askinFerguson.net)
Date: Fri Apr 04 2003 - 10:32:18 EST

  • Next message: Arndt Brenschede: "Re: Cayenne can't find obj entity class?"

    Weird... I had Cayenne (1.0a6) working in a simple command-line test
    case, but now I'm trying to plug it into the Swing framework I've got
    and it's not working.

    I've got the following source tree:

    src
    --appMap
    ----storage
    ------AssocType.class
    ------_AssocType.class

    and all my Cayenne config files are in the src directory.

    AssocType.map.xml includes:

    <obj-entity name="assocType" className="appMap.storage.AssocType"
    dbEntityName="AssocTypeTable">
            <obj-attribute name="Name" type="java.lang.String"
    db-attribute-name="Name"/>
            <obj-attribute name="ReverseName" type="java.lang.String"
    db-attribute-name="ReverseName"/>
        </obj-entity>

    but when I try to run the Swing app, I get an exception:

    org.objectstyle.cayenne.CayenneRuntimeException: Cannot find class
    appMap.storage.AssocType.

    I walked through the code and the exception is being thrown in
    org.objectstyle.cayenne.access.constructCache() at line 181, which
    incluees the following comment before it:

    //CTM Should this be using
    Configuration.getResourceLoader().loadClass(oe.getClassName()) ???
    entityClass = Class.forName(oe.getClassName());

    Is this a known bug? Is there some way I can work around it?

    As this point my object/data mappings are suffciently trivial that I may
    just do the bridge by hand... I've been impressed with Cayenne but if I
    can't get beyond this...

    I haven't retried my command-line test. I'll do that when I get back
    from a meeting.

    Thanks,

    dwh



    This archive was generated by hypermail 2.0.0 : Fri Apr 04 2003 - 10:37:07 EST