2 Replies Latest reply on Aug 1, 2012 2:05 PM by Vetle Leinonen-Roeim

    Replacing Weld Core in JBoss AS 7

    Vetle Leinonen-Roeim Newbie

      Hi,

       

      I wanted to try to reproduce WELD-1157 (https://issues.jboss.org/browse/WELD-1157) in JBoss 7 with a newer version of Weld (1.1.8.Final), but I'm running into some problems.

      Compiling Weld works fine, and I use "mvn -Pupdate-jboss-as" in weld-core/jboss-as/jboss-as-7 to replace Weld in JBoss.

       

      However, when I start JBoss (with the WAR file from the issue deployed), I get the following errors:

      10:27:49,431 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "weld-test.war"
      10:27:49,979 WARN  [org.jboss.modules] (MSC service thread 1-3) Failed to define class org.jboss.weld.exceptions.DefinitionException in Module "org.jboss.weld.core:main" from local module loader @15c018 
      (roots: /home/debian/dev/jboss-as-7.1.1.Final/modules): java.lang.LinkageError: Failed to link org/jboss/weld/exceptions/DefinitionException (Module "org.jboss.weld.core:main" from local module loader @1
      5c018 (roots: /home/debian/dev/jboss-as-7.1.1.Final/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.weld.xml.BeansXmlHandler.(BeansXmlHandler.java:143)
              at org.jboss.as.weld.deployment.BeansXmlParser.parse(BeansXmlParser.java:83)
              at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.parseBeansXml(BeansXmlProcessor.java:133)
              at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.deploy(BeansXmlProcessor.java:97)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
              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_03]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
      Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/DefinitionException
              at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_03]
              at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_03]
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_03]
              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]
              ... 18 more
      Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.DefinitionException from [Module "org.jboss.weld.core:main" from local module loader @15c018 (roots: /home/debian/dev/jboss-as-7.1.1.Final/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]
              ... 23 more
      
      10:27:49,996 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."weld-test.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."weld-test.war".PARSE: Failed to process phase PARSE of deployment "weld-test.war"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
              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_03]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
      Caused by: java.lang.NoClassDefFoundError: org/jboss/weld/exceptions/DefinitionException
              at org.jboss.weld.xml.BeansXmlHandler.(BeansXmlHandler.java:143)
              at org.jboss.as.weld.deployment.BeansXmlParser.parse(BeansXmlParser.java:83)
              at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.parseBeansXml(BeansXmlProcessor.java:133)
              at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.deploy(BeansXmlProcessor.java:97)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
              ... 5 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.weld.exceptions.DefinitionException from [Module "org.jboss.weld.core:main" from local module loader @15c018 (roots: /home/debian/dev/jboss-as-7.1.1
      .Final/modules)]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
      
      

       

      Is there anything else I have to do to replace Weld?

       

      Regards,

      Vetle