utility JARs incorrectly deployed --------------------------------- Key: JBAS-1549 URL: http://jira.jboss.com/jira/browse/JBAS-1549 Project: JBoss Application Server Type: Bug Components: Deployment Service Versions: JBossAS-3.2.7 Final Environment: Windows XP SP2 Sun JDK 1.3.1_15
Reporter: Erik Post Utility JARs in EARs are not correctly added to the classpath of Web modules (and possibly EJB modules) when these utility JARs contain a META-INF\ejb-jar.xml file, and when EARs are deployed using isolated class loaders. Consider the following situation: Code: test.ear META-INF\ application.xml web1.war META-INF\ MANIFEST.MF web.xml ejb1.jar META-INF\ ejb-jar.xml The application.xml only defines the web module: Code: <application> <display-name>TestEAR</display-name> <module> <web> <web-uri>web.war</web-uri> <context-root>/web</context-root> </web> </module> </application> Ejb1.jar is not listed as an EJB module. The web1.war MANIFEST.MF lists ejb1.jar. The web module contains a servlet that references a class in ejb1.jar. Ejb1.jar is thus used as an utility Jar. The EAR is isolated in its own classloader space via the following configuration in conf\jboss-service.xml: Code: <!-- EAR deployer, remove if you are not using Web layers --> <mbean code="org.jboss.deployment.EARDeployer" name="jboss.j2ee:service=EARDeployer"> <!-- Isolate all ears in their own classloader space --> <attribute name="Isolated">true</attribute> <!-- Enforce call by value to all remote interfaces --> <attribute name="CallByValue">true</attribute> </mbean> When the servlet is executed, a NoClassDefFoundError occurs for the references class that is in ejb1.jar. For comparison, the above setup works on WebSphere 5.0. Debugging and stepping through JBoss shows that the MainDeployer does not add ejb1.jar to the web module's classpath, because ejb1.jar is considered as an EJB module (ie an EJBDeployer is returned for the module). Only modules that are accepted by the JARDeployer are added to the classpath. Adding ejb1.jar as a java module in the application deployment descriptor does not solve the problem, because the jar file is then deployed as an EJB module. Removing ejb-jar.xml from ejb1.jar does work, but that is not really an option in out project, as the Jar file is not under our control. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- 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-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development