war deployment errors
gaulakh Oct 17, 2003 11:34 AMHi,
I am working with jboss 3.2.1 on Windows 2000.
I am having deployment problems with a scoped ear which has a ejb.jar and a web.war inside it.
The ejb.jar and the web.war share some common jars. (Specifically they share some axis jars).
Following the Jboss Book 3.2.1 documentation (pgs 168-170 Jboss Deployer Architecture),
I have put a class-path entry in the web.war MANIFEST file to include the common jars.
Here is a diagram of what I have
ejb.ear
META-INF
...+ MANIFEST.mf
...+ application.xml
...+ jboss-app.xml (to scope the ear)
....+ common1.jar
....+ common2.jar
....+ common3.jar
....+ ... bunch of jars that only ejb.jar uses
....+ ejb.jar
.........+ META-INF
............+ MANIFEST (with Class-Path: common1.jar common2.jar common3.jar... (as well as a list of jars ejb.jar requires))
.............+ ejb-jar.xml
.............+ jboss.xml
.........+ all the classes in ejb.jar
....+ web.war
.........+ META-INF
.............+ MANIFEST (with Class-Path: common1.jar common2.jar common3.jar)
.........+ WEB-INF
.............+web.xml
.............+ server-config.wsdd
.............+ lib (jars that only web.war needs)
.................+ ws.jar
.................+ soap.jar
I have scoped the ear by adding a jboss-app.xml in the ear with a loader repository configured.
<jboss-app>
<loader-repository>mycompany.ejb:loader=ejb.ear</loader-repository>
</jboss-app>
When I try to deploy the ear I get the following error
2003-10-16 15:38:36,172 WARN [org.jboss.jetty.JettyService] Failed to parse descriptors for war(file:/C:/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/ejb.ear/21.ejb.ear-contents/web.war)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException))
at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:864)
which eventually causes this error
2003-10-16 15:38:37,083 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/C:/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/ejb.ear/21.ejb.ear-contents/web.war
java.lang.Error: java.lang.ClassCastException
at org.mortbay.xml.XmlParser.(XmlParser.java:65)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:326)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
and the war deployement fails.
When I comment out the deployemnt of the ejb module in the application.xml, the scoped ear (along with the web.war) deploy fine.
When I comment out the deployment of the web module in the application.xml, the scoped ear (along with the ejb.jar) deploys fine.
When they are together the web.war deployemnt fails due to the above errors.
Does anyone have a clue what is going on here? Is there a bug in the jetty classloading?
Has anyone accomplished what I am trying to accomplish, which is basically trying to get a ejb.jar and web.war, in a
scoped ear, share common jars? Can this be done?