2 Replies Latest reply on Aug 1, 2013 9:24 AM by Guilherme Gomes

    Infinispan + JBoss EAP 6/AS7 - ClassNotFoundException: org.infinispan.distexec.spi.DistributedTaskLifecycle

    Guilherme Gomes Newbie

      Hi all,

       

      I'm new to the forum, and new to Infinispan.

       

      I'm currently trying to test it. Already download some examples and testes standalones apps. Right now I'm trying to configure an app using Infinispan along with CDI.

       

      My project was working just fine the dependency below configured in the POM file:

       

              <dependency>
                        <groupId>org.infinispan</groupId>
                        <artifactId>infinispan-core</artifactId>
                        <version>5.1.4.Final-redhat-1</version>
                        <scope>provided</scope>
              </dependency>
      

       

      And I had to add a jboss-deployment-structure.xml file:

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure>
                <deployment>
                          <dependencies>
                                    <module name="org.infinispan" />
                          </dependencies>
                </deployment>
      </jboss-deployment-structure>
      

       

       

      But now I added the infinispan-cdi entry:

       

              <dependency>
                        <groupId>org.infinispan</groupId>
                        <artifactId>infinispan-cdi</artifactId>
                        <version>5.3.0.Final</version>
              </dependency>
      

       

      And, after doing so, I'm getting some errors deploying the app:

       

       

      13:34:02,734 WARN  [org.jboss.modules] (MSC service thread 1-8) Failed to define class org.infinispan.cdi.CDIDistributedTaskLifecycle in Module "deployment.projeto.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/infinispan/cdi/CDIDistributedTaskLifecycle (Module "deployment.projeto.war:main" from Service Module Loader)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                at org.jboss.modules.Module.loadModuleClass(Module.java:527)

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

                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)

                at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:98) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]

                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:77) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]

                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]

                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]

                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:350) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]

                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

      Caused by: java.lang.NoClassDefFoundError: org/infinispan/distexec/spi/DistributedTaskLifecycle

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

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

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

                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                ... 21 more

      Caused by: java.lang.ClassNotFoundException: org.infinispan.distexec.spi.DistributedTaskLifecycle from [Module "deployment.projeto.war:main" from Service Module Loader]

                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)

                ... 26 more

       

      I'm also getting a ClassNotFoundException for the following:

      • org.infinispan.cdi.CDIDistributedTaskLifecycle
      • org.infinispan.distexec.mapreduce.spi.MapReduceTaskLifecycle
      • org.infinispan.cdi.CDIMapReduceTaskLifecycle
      • org.infinispan.util.TimeService
      • org.jgroups.View

       

      Am I missing some configuration or doing something wrong?

       

      Thx in advance!