9 Replies Latest reply on Oct 25, 2013 3:51 AM by Daniel Nuss

    WELD-001305 on EAP6.1

    durante Newbie

      Hi,

       

      I have an application using Infinispan 5.2.6 Final.

      It runs smoothly on JBoss AS 7.1 Final, however, it doesn't work on EAP 6.1.

       

      Deploying the same source and configuring EAP accordingly, the following stacktrace message is shown:

       

      Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001305 The given type class org.infinispan.cdi.DefaultEmbeddedCacheConfigurationProducer is not a type of the bean Managed Bean [class org.infinispan.cdi.AdvancedCacheProducer] with qualifiers [@Any @Synthetic]

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:633) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.solder.bean.generic.AbstractGenericProducerBean.getReceiver(AbstractGenericProducerBean.java:75) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

        at org.jboss.solder.bean.generic.AbstractGenericProducerBean.create(AbstractGenericProducerBean.java:62) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

        at org.jboss.solder.bean.generic.GenericProducerMethod.create(GenericProducerMethod.java:42) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

        at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:134) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.bean.SessionBean$SessionBeanInjectionTarget$1.proceed(SessionBean.java:179) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.weld.bean.SessionBean$SessionBeanInjectionTarget.inject(SessionBean.java:176) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]

        at org.jboss.as.weld.injection.WeldEEInjection.inject(WeldEEInjection.java:78) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:60) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:115) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        ... 141 more

       

      Following is how I set up the cache manager:

      @Stateful

      public class Config {

       

      @Produces

      @Resource(mappedName="java:jboss/infinispan/myContainer")

      public static EmbeddedCacheManager defaultEmbeddedCacheManager;

       

      }

       

      Note that the error occurs at the first time application hits the cache.

       

      It's exactly the same code which runs on JBoss AS 7, so I think there is something I missed when porting to the new server.

      Any suggestion?

       

       

      Thanks in advance,

      durante.

        • 1. Re: WELD-001305 on EAP6.1
          Daniel Nuss Newbie

          I have exactly the same issue with EAP 6.1. Could you solve this problem in the meanwhile?

          • 2. Re: WELD-001305 on EAP6.1
            Radoslav Husar Master

            Could you post the whole stack trace?

             

            Are you bundling your own Infinispan jars?

             

            Note that EAP 6.1 is build from AS 7.2, not 7.1. so a different behavior is possible.

            • 3. Re: WELD-001305 on EAP6.1
              durante Newbie

              Hi,

               

              I could not fix it to run with embedded Infinispan.

              To workaround that I returned to AS 7.1 and configured a standalone instance of Infinispan 6 (which is still in RC, but is to be released as Final soon). This way I can manage everything independently and things seem to work.

               

              The problem I see in this configuration, is that communication between AS and ISPN occurs through Hot Rod, which even being fast enough, probably isn't as fast as running everything embedded and in the same JVM.

               

               

              Anyway, if you get to a solution to this thread, let me know!

              • 4. Re: Re: WELD-001305 on EAP6.1
                Daniel Nuss Newbie

                No, i do not bundle my own Infinispan jars. Instead, i use the ones provided by JBoss (via manifest-entry: org.infinispan:main services). What worked for me was looking up the EmbeddedCacheManager and afterwards getting a named cache programmatically:

                 

                @Resource(mappedName="Java:jboss/infinispan/myContainer")
                public static EmbeddedCacheManager cacheManager;
                ...
                
                final Cache<String, String> cache = cacheManager.getCache("myCacheName");
                
                


                The mentioned error occurs when i try to inject the cache via CDI like this:

                 

                @Inject
                private AdvancedCache<Object, Object> cache;
                
                

                 

                 

                Please find the complete stack trace below:

                 

                [Server:server-two] 10:20:08,299 ERROR [org.hornetq.ra] (Thread-6 (HornetQ-client-global-threads-1493636012)) HQ154004: Failed to deliver message: javax.ejb.EJBTransactionRolledbackException: JBAS011048: Failed to construct component instance                                                                                                                                                                                       
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:138) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:317) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]                                                                                                                                                                                                     
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:196) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]                                                                                                                                                                                                   
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at javax.jms.MessageListener$$$view9.onMessage(Unknown Source) [jboss-jms-api_1.1_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
                [Server:server-two]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_34]
                [Server:server-two]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_34]
                [Server:server-two]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_34]
                [Server:server-two]     at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_34]
                [Server:server-two]     at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:140) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at $Proxy161.onMessage(Unknown Source)  at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:313)
                [Server:server-two]     at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1085) [hornetq-core-client-2.2.13.Final.jar:]
                [Server:server-two]     at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:57) [hornetq-core-client-2.2.13.Final.jar:]
                [Server:server-two]     at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1220) [hornetq-core-client-2.2.13.Final.jar:]
                [Server:server-two]     at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:106) [hornetq-core-client-2.2.13.Final.jar:]
                [Server:server-two]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_34]
                [Server:server-two]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_34]
                [Server:server-two]     at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_34]
                [Server:server-two] Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
                [Server:server-two]     at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1.create(MessageDrivenComponent.java:82) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1.create(MessageDrivenComponent.java:79) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.pool.AbstractPool.create(AbstractPool.java:60) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:123) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:226) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     ... 39 more
                [Server:server-two] Caused by: javax.ejb.EJBException: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001305 The given type class org.infinispan.cdi.DefaultEmbeddedCacheConfigurationProducer is not a type of the bean Managed Bean [class org.infinispan.cdi.AdvancedCacheProducer] with qualifiers [@Any @Synthetic]                                                                                                       
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]                                                                                                                                                                                                     
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     ... 47 more
                [Server:server-two] Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001305 The given type class org.infinispan.cdi.DefaultEmbeddedCacheConfigurationProducer is not a type of the bean Managed Bean [class org.infinispan.cdi.AdvancedCacheProducer] with qualifiers [@Any @Synthetic]                                                                                                                               
                [Server:server-two]     at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:633) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
                [Server:server-two]     at org.jboss.solder.bean.generic.AbstractGenericProducerBean.getReceiver(AbstractGenericProducerBean.java:75) [solder-impl-3.1.0.Final.jar:3.1.0.Final]
                [Server:server-two]     at org.jboss.solder.bean.generic.AbstractGenericProducerBean.create(AbstractGenericProducerBean.java:62) [solder-impl-3.1.0.Final.jar:3.1.0.Final]
                [Server:server-two]     at org.jboss.solder.bean.generic.GenericProducerMethod.create(GenericProducerMethod.java:42) [solder-impl-3.1.0.Final.jar:3.1.0.Final]
                [Server:server-two]     at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
                [Server:server-two]     at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
                [Server:server-two]     at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
                [Server:server-two]     at org.jboss.as.weld.injection.InjectableField.inject(InjectableField.java:56) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.weld.injection.WeldEEInjection.inject(WeldEEInjection.java:81) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:60) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]                                                                                                                                                                                            
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
                [Server:server-two]     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                [Server:server-two]     ... 56 more

                • 5. Re: WELD-001305 on EAP6.1
                  Tristan Tarrant Master

                  Unfortunately this is a compatibility problem between the version of Solder that we require in Infinispan 5.2.x's CDI module and the version of Weld included in EAP. The solution was to not depend on solder at all, and the fix will be available in Infinispan 6.

                   

                  [ISPN-3208] Remove Solder dependency from Infinispan CDI - JBoss Issue Tracker

                   

                  Tristan

                  • 6. Re: Re: Re: WELD-001305 on EAP6.1
                    Radoslav Husar Master

                    Are you using JCache annotations as well or just looking for a way to inject and use the cache?

                     

                    I would recommend leaving out the Infinispan CDI module for now until we ship it by default (see [WFLY-216] Include Infinispan CDI as a JBoss module - JBoss Issue Tracker) and use the EE @Resource annotation.

                     

                    Similar to what you are doing, you could possibly use @PostConstruct to get the cache instance as well, something like:

                     

                    @Resource(lookup="java:jboss/infinispan/container/mycontainer")
                    private final EmbeddedCacheManager manager;
                    private Cache cache;
                    
                    @PostConstruct
                    public void initializeCache() {
                      cache = manager.getCache();
                    ...
                    
                    • 7. Re: Re: Re: WELD-001305 on EAP6.1
                      Daniel Nuss Newbie

                      I'm just looking for a way to inject and use the cache, so the way you are describing is totally fine for me. Thank you!

                      • 8. Re: Re: Re: Re: WELD-001305 on EAP6.1
                        Radoslav Husar Master

                        I totally forgot the main point!

                         

                        I was going to say, that you can stick with CDI no problem, I just don't recommend using the Infinispan-CDI module ATM. What you can do, is to create a producer for your type. So something like:

                         

                        @Singleton
                        public class CacheResources {
                        
                          @Resource(lookup="java:jboss/infinispan/container/mycontainer")
                          private static EmbeddedCacheManager manager;
                        
                          @Produces
                          public Cache produceCache() {
                              return manager.getCache();
                          }
                        }
                        
                        
                        


                        • 9. Re: Re: Re: Re: WELD-001305 on EAP6.1
                          Daniel Nuss Newbie

                          Ah, yes, sure. I did it the way you described it and it worked without a problem (only had to add a qualifier to make my cache unique). When i think about it, that's actually a rather obvious solution, but it just did not come to my mind :-)

                          Thanks Radoslav, that really solved it for me!