java - jboss failed to define class javax.jms.JMSException -
i new jboss. had ear file worked ok on was. when tried on jboss eap 7.1, gave me below error.
14:15:18,640 warn [org.jboss.modules] (msc service thread 1-6) failed define class javax.jms.jmsexception in module "deployment.xxx.ear.yyy.war:mai n" service module loader: java.lang.classformaterror: failed link javax/jms/jmsexception (module "xxx.ear.yyy.war:main" service module loader): absent code attribute in method not native or abstract in class file javax/jms/jmsexception @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(unknown source) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(unknown source) @ java.lang.reflect.constructor.newinstance(unknown source) @ org.jboss.modules.moduleclassloader.defineclass(moduleclassloader.java:446) @ org.jboss.modules.moduleclassloader.loadclasslocal(moduleclassloader.java:274) @ org.jboss.modules.moduleclassloader$1.loadclasslocal(moduleclassloader.java:78) @ org.jboss.modules.module.loadmoduleclass(module.java:605) @ org.jboss.modules.moduleclassloader.findclass(moduleclassloader.java:190) @ org.jboss.modules.concurrentclassloader.performloadclassunchecked(concurrentclassloader.java:363) @ org.jboss.modules.concurrentclassloader.performloadclass(concurrentclassloader.java:351) @ org.jboss.modules.concurrentclassloader.loadclass(concurrentclassloader.java:93) @ java.lang.class.getdeclaredconstructors0(native method) @ java.lang.class.privategetdeclaredconstructors(unknown source) @ java.lang.class.getconstructor0(unknown source) @ java.lang.class.getconstructor(unknown source) @ org.jboss.as.jsf.deployment.jsfmanagedbeanprocessor.deploy(jsfmanagedbeanprocessor.java:100) @ org.jboss.as.server.deployment.deploymentunitphaseservice.start(deploymentunitphaseservice.java:147) @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1948) @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1881) @ java.util.concurrent.threadpoolexecutor.runworker(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown source) 14:15:18,640 error [org.jboss.msc.service.fail] (msc service thread 1-6) msc000001: failed start service jboss.deployment.subunit."xxx.ear"."yyy.war ".post_module: org.jboss.msc.service.startexception in service jboss.deployment.subunit."xxx.ear"."yyy.war".post_module: wflysrv0153: failed process phase post_module of subdeployment "yyy.war" of deployment "xxx.ear" @ org.jboss.as.server.deployment.deploymentunitphaseservice.start(deploymentunitphaseservice.java:154) @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1948) @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1881) @ java.util.concurrent.threadpoolexecutor.runworker(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown source) caused by: java.lang.classformaterror: failed link javax/jms/jmsexception (module "deployment.xxx.ear.yyy.war:main" service module loader): abs ent code attribute in method not native or abstract in class file javax/jms/jmsexception @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(unknown source) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(unknown source) @ java.lang.reflect.constructor.newinstance(unknown source) @ org.jboss.modules.moduleclassloader.defineclass(moduleclassloader.java:446) @ org.jboss.modules.moduleclassloader.loadclasslocal(moduleclassloader.java:274) @ org.jboss.modules.moduleclassloader$1.loadclasslocal(moduleclassloader.java:78) @ org.jboss.modules.module.loadmoduleclass(module.java:605) @ org.jboss.modules.moduleclassloader.findclass(moduleclassloader.java:190) @ org.jboss.modules.concurrentclassloader.performloadclassunchecked(concurrentclassloader.java:363) @ org.jboss.modules.concurrentclassloader.performloadclass(concurrentclassloader.java:351) @ org.jboss.modules.concurrentclassloader.loadclass(concurrentclassloader.java:93) @ java.lang.class.getdeclaredconstructors0(native method) @ java.lang.class.privategetdeclaredconstructors(unknown source) @ java.lang.class.getconstructor0(unknown source) @ java.lang.class.getconstructor(unknown source) @ org.jboss.as.jsf.deployment.jsfmanagedbeanprocessor.deploy(jsfmanagedbeanprocessor.java:100) @ org.jboss.as.server.deployment.deploymentunitphaseservice.start(deploymentunitphaseservice.java:147) ... 5 more
from research, seems issue of dependency, has interface only.
<dependency> <groupid>javax</groupid> <artifactid>javaee-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency>
so changed to
<dependency> <groupid>org.apache.openejb</groupid> <artifactid>javaee-api</artifactid> <version>6.0-5</version> </dependency>
but no luck. looking jar j2ee.jar. find 1 jboss-ejb-api_3.2_spec-1.0.0.final-redhat-1.jar under jboss runtime. doesn't contain on javax.jms.*.
also looked @ class loading. patched ear file jboss-deployment-structure.xml content eliminating double class loading.
<jboss-deployment-structure> <ear-subdeployments-isolated>true</ear-subdeployments-isolated> </jboss-deployment-structure>
still doesn't work. suggestions?
that javax.javaee-api.6.0
maven dependency has single well documented problem - byte code implementation classes needs has been stripped, resulting in java.lang.classformaterror
.
the reason seeing because though dependency
says <scope>provided</scope>
, copy of jar has leaked application deployment somewhere. need rid of it.
once have done can upgrade dependency <version>7.0</version>
not have problem (which issue unit tests depend upon it).
Comments
Post a Comment