RE: Newbie question on Cayenne error at runtime

From: McBrayer, Roy (Roy.McBraye..ail.va.gov)
Date: Wed Jul 14 2004 - 08:37:47 EDT

  • Next message: McBrayer, Roy: "RE: Newbie question on Cayenne error at runtime"

    This is for a standalone app so I will try the bootstrap solution . Thanks.

    Roy

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: Tuesday, July 13, 2004 5:26 PM
    To: cayenne-use..bjectstyle.org
    Subject: Re: Newbie question on Cayenne error at runtime

    Hi Roy,

    This looks like a nested ClassLoader issue recently discussed on the
    list -
    http://objectstyle.org/cayenne/lists/cayenne-user/2004/07/0047.html

    The solution is either load cayenne.jar using the same class loader as
    the one used for the application classes (in case of web app, this
    simply means putting cayenne.jar in the web app WEB-INF/lib/
    directory), or bootstrap cayenne with appropriate class loader
    explicitly:

    Configuration.bootstrapSharedConfiguration(iiv_test.SiteDailySum);

    The first solution is cleaner, but you don't always have a choice...

    Andrus

    On Jul 13, 2004, at 5:09 PM, McBrayer, Roy wrote:
    > I am getting this error when trying to run a simple Cayenne based
    > project.
    > It builds just fine but when I try to run it I get the following.
    >
    >
    > java.lang.IllegalArgumentException: Can't find ObjEntity for DataObject
    > class: iiv_test.SiteDailySum, class is likely not mapped. at
    > org.objectstyle.cayenne.access.DataContext.registerNewObject(DataContex
    > t.jav
    > a:889) at iiv_test.CreateReport.createReport1(CreateReport.java:20)

    > at
    > iiv_test.CreateReport.main(CreateReport.java:12) Exception in thread
    > "main"
    >
    >
    > I am also getting a long list of warnings like
    >
    > WARN EntityResolver: *** Class 'XplSdw' not found in runtime.
    > Ignoring.
    >
    >
    >
    > I have created all of my Java source code and the 3 xml files.
    >
    > What else do I need to do?
    >
    > Roy McBrayer
    > Dept. of Veteran's Affairs
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Jul 14 2004 - 08:37:54 EDT