We are having problems deploying EJB applications under a combined JBoss3.2.5/Tomcat5x server. What we want to do is be able to deploy multiple EARs which contain EJBs, and WARs which reference those EJBs. We would like to have some EARs which might provide EJBs which are common to several applications. We are having problems configuring our EARs and WARs, even in the simplest case, and are hoping someone may be able to help. In the simplest case what we want to deploy is something like this: JBoss Deploy Dir ---------------- | |---Application1.ear | | | |---Application1Ejb.jar | | |---applicationlayer.User | | |---applicationlayer.UserBean | | |---applicationlayer.UserHome | | | |---Other.jar | | | |---META-INF | |---application.xml | |---jboss-app.xml | |---Manifest.mf | |---Client1.war | | | |---WEB-INF | |---web.xml | |---jboss-web.xml | | | |---classes | | |---client.TestServlet | | | |---lib | |---Application1EjbClientClasses.jar | | |---applicationlayer.User | | |---applicationlayer.UserHome | | | |---Other.jar In the above we have a web application, Client1.war, which invokes an EJB in an application, Application1.ear, by doing a Jndi lookup (we haven't coded local EJB classes). Both Application1 and Client1 contain their own version of some common code in Other.jar. In order for Client1 and Application1 to work correctly, they also need to be able to use code from their own version of Other.jar (that is packaged inside them) - this means they each need to be loaded by their own class loader. (Later, we might deploy another application, Application2.ear which also might want to lookup EJBs in Application1.ear.)
We found several references which indicated several things needed to be configured to make things work. Currently we have: Excerpt from web.xml - <loader-repository>client1:loader=Client1.war</loader-repository> <ejb-ref> <ejb-ref-name>UserBean</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> applicationlayer.UserHome applicationlayer.User </ejb-ref><ejb-ref> <ejb-ref-name>UserBean</ejb-ref-name> <jndi-name>jnp://localhost/UserBeanJndiName</jndi-name> </ejb-ref> Other.jar Excerpt from ejb-jar.xml - <enterprise-beans> <display-name>UserBean</display-name> <ejb-name>UserBean</ejb-name> applicationlayer.UserHome applicationlayer.User <ejb-class>applicationlayer.UserBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </enterprise-beans> Excerpt from jboss.xml - <enterprise-beans> <ejb-name>UserBean</ejb-name> <jndi-name>UserBeanJndiName</jndi-name> </enterprise-beans> Excerpt from jboss-app.xml - <loader-repository>application1:loader=Application1Ejb.ear</loader-repository> When we run the TestServlet with this configuration, we get the following error, which we haven't been able to resolve: 2005-02-08 10:07:26,047 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException: javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract applicationlayer.User applicationlayer.UserHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException If we deploy Client1.war in a stand-alone Tomcat instance, and Application1.ear in a separate JBoss instance, then the Jndi lookup succeeds and everything works as expected. Also, if we deploy both Client1.war and Application1.ear in the combined JBoss/Tomcat using the default class loader (ie without the loader-repository tags), then the Jndi lookup succeeds and the servlet works (but only the first loaded Other.jar classes are visible, which is not what we want). This implies that the 'standard' part of the EJB packaging/lookup is correct, and that there is some JBoss-specific configuration that we are missing. We have tried several variations of things with no success. Can anyone suggest what the solution might be please? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866300#3866300 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3866300 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user