aspose file tools*
The moose likes JBoss/WildFly and the fly likes problem deploying EAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "problem deploying EAR file" Watch "problem deploying EAR file" New topic
Author

problem deploying EAR file

Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
I am trying to deploy an EAR file on JBoss 2.4.4. The EAR file contains around 15 CMP and 3 stateless session beans. The CMPs and the Session beans are also using some helper classes. The structure of the ear file is like this :
myapp.ear
-META-INF/application.xm
-cmp1.jar
-cmp2.jar
-cmp3.jar
....
-cmp15.jar
-stateless1.jar
-stateless2.jar
-stateless3.jar
-example/helper/HelperClass1.class
-example/helper/HelperClass2.class
-example/helper/HelperClass3.class
....
-example/helper/HelperClass10.class

When I deploy the ear with the above structure in the JBoss 2.4.4, it gives ClassNotFoundException for 2 or 3 Helper classes and the deployment fails. Here is the exception stack trace :
[INFO,AutoDeployer] Auto deploy of file:/data/ankit/JBoss-2.4.4/deploy/myapp.ear
[INFO,J2eeDeployer] Deploy J2EE application: file:/data/ankit/JBoss-2.4.4/deploy/myapp.ear
[INFO,J2eeDeployer] Create application myapp.ear
[INFO,J2eeDeployer] install EJB module stateless1.jar
[INFO,J2eeDeployer] install EJB module cmp1.jar
[INFO,J2eeDeployer] install EJB module stateless2.jar
[INFO,J2eeDeployer] install EJB module stateless3.jar
[INFO,J2eeDeployer] install EJB module cmp2.jar
[INFO,J2eeDeployer] install EJB module cmp3.jar
[INFO,J2eeDeployer] install EJB module cmp4.jar
[INFO,J2eeDeployer] install EJB module cmp5.jar
[INFO,J2eeDeployer] install EJB module cmp6.jar
[INFO,J2eeDeployer] install EJB module cmp7.jar
[INFO,J2eeDeployer] install EJB module cmp8.jar
[INFO,J2eeDeployer] install EJB module cmp9.jar
[INFO,J2eeDeployer] install EJB module cmp10.jar
[INFO,J2eeDeployer] install EJB module cmp11.jar
[INFO,J2eeDeployer] install EJB module cmp12.jar
[INFO,J2eeDeployer] install EJB module cmp13.jar
[INFO,J2eeDeployer] install EJB module cmp14.jar
[INFO,J2eeDeployer] install EJB module cmp15.jar
[INFO,J2eeDeployer] add all ejb jar files to the common classpath
[INFO,ContainerFactory] Deploying:file:/data/ankit/JBoss-2.4.4/tmp/deploy/Default/myapp.ear
[ERROR,ContainerFactory] Verify failure
java.lang.NoClassDefFoundError: example/helper/HelperClass4
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:456)
at org.jboss.verifier.strategy.EJBVerifier11.verifySessionBean(EJBVerifier11.java:567)
at org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVerifier11.java:93)
at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:134)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:465)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:369)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:306)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
at java.lang.Thread.run(Thread.java:484)
[INFO,ContainerFactory] Deploying Stateless1
[INFO,ContainerFactory] Deploying CMP1
[ERROR,ContainerFactory] Verify failure
java.lang.NoClassDefFoundError: example/helper/HelperClass6
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:456)
at org.jboss.verifier.strategy.EJBVerifier11.verifySessionBean(EJBVerifier11.java:567)
at org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVerifier11.java:93)
at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:134)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:465)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:369)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:306)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
at java.lang.Thread.run(Thread.java:484)
[INFO,ContainerFactory] Deploying CMP2
[INFO,ContainerFactory] Deploying Stateless2
[INFO,ContainerFactory] Deploying CMP3
[INFO,ContainerFactory] Deploying CMP4
[INFO,ContainerFactory] Deploying Stateless3
[ERROR,ContainerFactory] Verify failure
java.lang.NoClassDefFoundError: example/helper/HelperClass3.class
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:456)
at org.jboss.verifier.strategy.EJBVerifier11.verifySessionBean(EJBVerifier11.java:567)
at org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVerifier11.java:93)
...........
...........
[ERROR,J2eeDeployer] Starting myapp.ear failed!
[ERROR,Default] java.lang.NoClassDefFoundError: example/helper/HelperClass4
[ERROR,Default] at java.lang.Class.getMethods0(Native Method)
[ERROR,Default]
[ERROR,Default] at java.lang.Class.getMethods(Class.java:742)
[ERROR,Default]
[ERROR,Default] at org.jboss.ejb.StatelessSessionContainer.setupBeanMapping(StatelessSessionContainer.java:450)
...........
...........
[INFO,J2eeDeployer] Module myapp.ear is not running
[INFO,J2eeDeployer] Destroying application myapp.ear
[ERROR,AutoDeployer] DeploymentInfo failed:file:/data/ankit/JBoss-2.4.4/deploy/myapp.ear
org.jboss.deployment.J2eeDeploymentException: Error while starting myapp.ear: example/helper/HelperClass4, Cause: java.lang.NoClassDefFoundError: example/helper/HelperClass4
at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:524)
at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
at java.lang.Thread.run(Thread.java:484)
As seen above, some of the beans are deployed properly, some throws class not found exception for the helper classes. Here the interesting fact is that, the Helper classes are being used in all the jar files, but some are deployed properly, while some throws this exception while deploying.
Also, if I deploy the same EAR file (removed the jaws.xml from all the bean jar files), on either JBoss 3.0 or JBoss 3.2.3, there it is deployed properly without any errors.
Can anybody suggest what is wrong while deploying this on JBoss 2.4.4?
Waiting for replies,
Ankit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem deploying EAR file
 
Similar Threads
what is wrong with this EJB
Verify failure Deployment Exception
Verify failure
Deploy problem
Deploying Adder Bean of Budi Kurniawan's book