3 Replies Latest reply on Jan 3, 2013 10:21 AM by Keith Babo

    Missing module dependency in drools module

    Gary Brown Master

      Hi

       

      I'm getting some warnings when I test bam against the latest master (0.7.0.Final version), which are fixed by adding a module dependency for javax.enterprise.api into the drools modules.xml.

       

      The warnings are:

       

      15:07:36,770 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class org.drools.cdi.KieCDIExtension in Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules): java.lang.LinkageError: Failed to link org/drools/cdi/KieCDIExtension (Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules))

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:114) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadAttachments(WeldPortableExtensionProcessor.java:100) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.deploy(WeldPortableExtensionProcessor.java:86) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

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

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

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

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]

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

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]

      Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/Extension

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

          at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_07]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_07]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]

          ... 17 more

      Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.Extension from [Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

          ... 22 more

       

      15:07:36,778 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class org.drools.cdi.KieCDIExtension$1 in Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules): java.lang.LinkageError: Failed to link org/drools/cdi/KieCDIExtension$1 (Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules))

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

          at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_07]

          at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0_07]

          at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0_07]

          at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:116) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadAttachments(WeldPortableExtensionProcessor.java:100) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.deploy(WeldPortableExtensionProcessor.java:86) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

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

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

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

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]

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

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]

      Caused by: java.lang.NoClassDefFoundError: javax/enterprise/util/AnnotationLiteral

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

          at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_07]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_07]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]

          ... 22 more

      Caused by: java.lang.ClassNotFoundException: javax.enterprise.util.AnnotationLiteral from [Module "org.drools:main" from local module loader @471cc198 (roots: /home/gbrown/testing/overlord/bam/switchyard-as7-0.7/modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

          ... 27 more

       

      Haven't fully diagnosed the impact yet, but it looks like it is just a warning at this stage. I'll create a jira, but wasn't sure if you wanted this resolved before uploading the distribution.

       

      Regards

      Gary