From: Jon L. <jon...@xe...> - 2002-08-08 06:41:59
|
I've had a similar problem using Orion as the application server and I've been trying to solve it for a while with no luck. I know the required jar's are in the classpath because it can find the classes with no problem, however when I try to load a resource from the same jar it can't find it. Trying to figure out the class loading of a J2EE server is a nightmare. FYI - The only way I was able to solve the problem up till now was either to put the classes in the server's classpath, or to put the jar's in the the WEB-INF/lib directory if they are only used by the web application (though this doesn't solve the problem when it comes to MBean usage.) Jon... ----- Original Message ----- From: <Gavin_King/Cirrus%CI...@ci...> To: <hib...@li...> Sent: Thursday, August 08, 2002 2:19 AM Subject: RE: [Hibernate-devel] RE: JMX/JBoss > > >I put the mapping files with the classes in the EJB jar file and fired up > >JBoss. I got the following back: > > > >Embedded Exception Hibernate lazy instantiation problem: Resource: > >/com/vetconnect/client/dao/Client.hbm.xml not found; > >nested exception is: > >javax.ejb.EJBException: null Embedded Exception Hibernate lazy > instantiation > >problem: Resource: /com/vetconnect/client/dao/Client.hbm.xml not found > > Damn! I really don't understand why the following line wouldn't work: > > ds.storeResource( > resources[i], Thread.currentThread().getContextClassLoader() > ); > > ( in SessionFactoryStub.getImpl() ). Have I got it totally wrong, or isn't > Thread.currentThread.getContextClassLoader() meant to get the classloader > used by the calling EJB? Perhaps I'm hallucinating... > > >The only way I can see making this MBean useful is if users put all their > >mapped classes and mappings in the server's classpath. Then they can put > >them all in one mapping or split them up and it won't matter because the > >MBean and SessionFactoryStub will have access to them. > > Well, it would work. but seems suboptimal. Theres got to be *some* way for > a thread servicing an EJB method call to get hold of the EJB's *own* > classloader doesn't there??? > > >What do you want to do with this? > > I dunno. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Hibernate-devel mailing list > Hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |