Re: IllegalArgumentException

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jul 08 2004 - 12:20:01 EDT

  • Next message: Kevin J. Menard, Jr.: "Re: IllegalArgumentException"

    Kevin,

    Could it be a ClassLoader issue? I.e.
    net.negativetwenty.bad_driver.models.Age is loaded by a child
    classloader of the one that loads cayenne.jar? This is a common thing
    with web containers that use a few levels of nested classloaders.

    One possible fix is to bootstrap the right ClassLoader. You can follow
    the advise given here:

    http://objectstyle.org/cayenne/lists/cayenne-user/2004/06/0078.html

    Andrus

    On Jul 8, 2004, at 10:45 AM, Kevin J. Menard, Jr. wrote:

    > Hi,
    >
    > I'm having some difficulty with my first cayenne project, and was
    > hoping
    > someone might be able to give me a hand. I'm using Cayenne 1.1M7_1 in
    > a
    > Tapestry 3.0 application. I've followed the tutorial and looked at the
    > sample tapestry app quite extensively.
    >
    > I keep getting the following error, however:
    >
    > java.lang.IllegalArgumentException: Can't find ObjEntity for DataObject
    > class: net.negativetwenty.bad_driver.models.Age, class is likely not
    > mapped.
    >
    > The Age class was generated by CayenneModeler and I made sure the
    > classes
    > were sync'ed with the db entities. The weird thing is, I've stepped
    > through the source and objEntityCache in EntityResolver contains the
    > class
    > as a key, but always returns null. I thought this might be a system
    > issue
    > (even though the sample tapestry app worked great) and I ran into the
    > same
    > problem with the 7/7/04 nightly.
    >
    > Any help would be greatly appreciated.
    >
    > Thanks,
    > Kevin
    >



    This archive was generated by hypermail 2.0.0 : Thu Jul 08 2004 - 12:20:06 EDT