[jboss-user] [EJB 3.0] - Re: ejb3.deployer does not have access to ear scoped loader

barakka do-not-reply at jboss.com
Thu Feb 19 09:54:11 EST 2009


Hi!

thanks for the replay. I've read the post you suggested and the one that was pointed by that one. I had already explored this topics and read everything I could find on the internet about the jboss classloader, loader repository, etc.

The problem, however, is not related to hibernate search being moved. The class cast exception that I get are basic hibernate classes, like Session, etc.

What I've been able to dig out is that the ejb3.deployer and my ear use two separate classloader, with the one used by the ejb3.deployer loading the lib from the the server folder and the one for my app reading the lib from my ear. 

In fact, if you take the issue to its extreme and suppose that the server does not provide any hibernate lib, the ejb3.deployer will not work at all, as it can't find the hibernate classes needed to create the persistence manager factory (declared in my ear persistence.xml). And I believe this behaviour is not the correct one: the deployer should use the ear classloader. 

I'm now wondering if I can define the ejb.deployer service within my ear directly, so it will use its classloader.

Thanks, 
Riccardo.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211500#4211500

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211500



More information about the jboss-user mailing list