2 Replies Latest reply on Dec 16, 2013 9:29 AM by Eldar Yusupov

    Using infinispan-cdi with Wildfly 8

    Eldar Yusupov Newbie

      Hi, I tried to create a simple project using infinispan-cdi, but as soon as I add infinispan-cdi to pom.xml, I'm getting the following error during deployment:

       

      20:32:20,144 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."site-0.0.1-SNAPSHOT.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."site-0.0.1-SNAPSHOT.war".WeldStartService: Failed to start service

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1900) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

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

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

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

      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001407: Cannot declare an injection point with a type variable: [BackedAnnotatedField] @Inject private org.infinispan.cdi.event.AbstractEventBridge.baseEvent

          at org.jboss.weld.bootstrap.Validator.checkFacadeInjectionPoint(Validator.java:756)

          at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDefinitionErrors(Validator.java:311)

          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:279)

          at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:133)

          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)

          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:507)

          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)

          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

          ... 3 more

       

      20:32:20,153 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "site-0.0.1-SNAPSHOT.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"site-0.0.1-SNAPSHOT.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"site-0.0.1-SNAPSHOT.war\".WeldStartService: Failed to start service

          Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001407: Cannot declare an injection point with a type variable: [BackedAnnotatedField] @Inject private org.infinispan.cdi.event.AbstractEventBridge.baseEvent"}}

      20:32:20,156 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "site-0.0.1-SNAPSHOT.war" was rolled back with the following failure message:

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"site-0.0.1-SNAPSHOT.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"site-0.0.1-SNAPSHOT.war\".WeldStartService: Failed to start service

          Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001407: Cannot declare an injection point with a type variable: [BackedAnnotatedField] @Inject private org.infinispan.cdi.event.AbstractEventBridge.baseEvent"}}

       

      Here's the section of pom.xml where I declare infinispan-cdi:

      <dependency>

           <groupId>org.infinispan</groupId>

           <artifactId>infinispan-cdi</artifactId>

           <version>6.0.0.Final</version>

      </dependency>

       

      Here's the relevant part of source of the class where the error is happening:

      public class AbstractEventBridge<T> {

       

       

         @Inject

         private Event<T> baseEvent;

         ....

      }

       

      I tried running it with Wildfly Beta1 (Weld 2.1.Cr1) and nightly snapshot #180 (Weld 2.1.Final)