It is very simple, cglib must define proxy in application classloader (the same as domain class loader), it doe's not mater how you find this clasloader, but it must be the same for proxy and for domain class (delegation to package visibility method throws IllegalAccessError if classes are in different "runtime packages"). Proxy must see hibernate and cglib classes to work, so hibernate and cglib must be in the same or in the parent classloader. Sorry if I confused you, it is not related to j2ee classloading stuff. This rule is valid for all use cases.
--- Scott M Stark <[EMAIL PROTECTED]> wrote: > The class loading structure of a j2ee app is vendor > specific. For any > given component the correct starting point is the > thread context class > loader. That class loader should have visibility > into parent class > loaders as needed. > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > On > > Behalf Of baliuka juozas > > Sent: Thursday, June 16, 2005 12:12 AM > > To: [EMAIL PROTECTED]; > hibernate-devel@lists.sourceforge.net > > Subject: Re: Fw: RE: [Hibernate] Complex class > loaders hierarchy > > > > I do not think it is possible to find the the best > way for > > this stuff, but we expected hibernate (and cglib) > classes > > will be in the same or in the parent classloader > (asumption > > is based on j2ee container class loading stuff). > It must be > > better to use this asumption, it has more chances > to be maintained. > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > from IBM. Find simple to follow Roadmaps, > straightforward articles, > informative Webcasts and more! Get everything you > need to get up to > speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > _______________________________________________ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel