Re: Cayennes ClassLoader

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jun 10 2004 - 13:46:25 EDT

  • Next message: Andrus Adamchik: "Cayenne and Hibernate by Bill Dudney"

    Cayenne only needs access to you DataObjects (I hope they all come from
    the same ClassLoader), so to "inject" the right class loader, you can
    do this before using anything in Cayenne:

        
    Configuration.bootstrapSharedConfiguration(com.myproject.Login.class);

    Andrus

    On Jun 10, 2004, at 9:41 AM, Elia Morling wrote:

    > Hi,
    > I use a classloader to load different versions of my code. They reside
    > in other paths than the
    > Main.class running my program.
    >
    > Cayenne looks for files in the path of my running application and this
    > causes the following
    > error:
    >
    > Error org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1M6 April
    > 25 2004] C
    > annot find class com.myproject.Login
    >
    > The error is produced while I do a: context.performQuery(query);
    > I guess Cayenne has its own Classloader. Can I change its path somehow
    > so Cayenne knows
    > where to look?
    >
    > Elia
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jun 10 2004 - 13:46:27 EDT