[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Upgrading 4.0.4 to 4.2.2; problems accessing EJBs
do-not-reply at jboss.com
Wed Jun 4 14:34:17 EDT 2008
I find the class I'm looking for in the JNDI tree view. It has the proxy name of the class that I also see when in the debugger when I get the instance from the JNDI lookup. In the JNDI tree view it says that it implements the Home Interface that I expect. Yet the cast fails. So, I assume that the problem is multiple copies of the class in the deployment, being seen by different class loaders. I'd like to try to resolve the situation without completely rewriting my build scripts. I looked at the JMImplementation output from displayClassInfo and it tells me that there's only one instance, but I know that I'm deploying the Home interface class in two different places. It's in the ejbjar that contains the implementation of the bean itself, and it's also in the ejb_client.jar that contains the interfaces only. This was my understanding of how to deploy at some point. I've removed it from the ejb_client.jar and am able to get past the class cast exception, but get a linkage error when attempting to invoke a method on the instance, although I'm able to create the instance with no problem.
The ejb.jar is deployed directly in the ear, and the ejb_client.jar is in the WEB-INF/lib directory of the war.
Should I move the interfaces to a separate jar file and put it into a new lib directory in the ear, which will then be available to both the implementation in the ejb-jar (having been removed from there) as well as the classes in the war? It seems to me that this is the new deployment mechanism, made possible by J2EE 5.0. Have I got that right?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155790#4155790
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155790
More information about the jboss-user