0 Replies Latest reply on Oct 8, 2014 6:21 PM by Chris Jansen

    Can you use Snowdrop and conventional ejb-jar.xml usage in the same war file?

    Chris Jansen Newbie

      Hi all:

       

      I have a general question - are we supposed to be able to use Snowdrop interchangeably with enterprise beans described in a conventional ejb-jar.xml file?

       

      Here's why I ask:

       

      I am working on a project with JBoss EAP 6.2 that involve JEE message driven beans that, in turn, invoke Spring objects.  I was able to get Snowdrop (3.1.1 Final/using Spring 3.1 dependencies) to work today using annotated message driven beans inside of a war file.

       

      Immediately after, I tried to create a separate MDB within the same project, this time using XML descriptors (ejb-jar.xml).  When I deploy the war, I receive the following error:

       

      18:08:15,231 WARN  [org.jboss.modules] (MSC service thread 1-8) Failed to define class my.mdb.SimpleMdb in Module "deployment.jboss-helloworld-mdb.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/springframework/ejb/support/AbstractJmsMessageDrivenBean (Module "org.springframework.spring:snowdrop" from local module loader @4b43cc20 (finder: local module finder @500e6f7a (roots: D:\jboss-eap-6.2\modules,D:\jboss-eap-6.2\modules\system\layers\base,D:\jboss-eap-6.2\modules\system\add-ons\snowdrop)))

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_40]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:792) [rt.jar:1.7.0_40]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_40]

          at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_40]

          at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]

          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

      Caused by: java.lang.NoClassDefFoundError: javax/jms/MessageListener

          at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_40]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:792) [rt.jar:1.7.0_40]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

          ... 31 more

      Caused by: java.lang.ClassNotFoundException: javax.jms.MessageListener from [Module "org.springframework.spring:snowdrop" from local module loader @4b43cc20 (finder: local module finder @500e6f7a (roots: D:\jboss-eap-6.2\modules,D:\jboss-eap-6.2\modules\system\layers\base,D:\jboss-eap-6.2\modules\system\add-ons\snowdrop))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          ... 35 more

       

      I tried resolving the error above by adding the missing class to the Spring module, but ran into subsequent errors.  The approach felt really unnatural so I removed my changes.

       

      If I remove Snowdrop (by removing the additions to the standup-full.xml file), the MDB's described in my ejb-jar.xml work fine!!

       

      Regards,

      Chris