Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5195

CacheConfigurationException when two methods using default cache configuration are called in same request

XMLWordPrintable

      When two methods annotated with @CacheResult (without cacheName specified) are called in the same request, then the following error occurs:

      org.infinispan.commons.CacheConfigurationException: Detected interceptor of type [org.infinispan.jcache.interceptor.ExpirationTrackingInterceptor] being added to the interceptor chain 1743453620 more than once!
      at org.infinispan.interceptors.InterceptorChain.assertNotAdded(InterceptorChain.java:76)
      at org.infinispan.interceptors.InterceptorChain.addInterceptorBefore(InterceptorChain.java:248)
      at org.infinispan.CacheImpl.addInterceptorBefore(CacheImpl.java:717)
      at org.infinispan.jcache.JCache.addExpirationTrackingInterceptor(JCache.java:158)
      at org.infinispan.jcache.JCache.<init>(JCache.java:111)
      at org.infinispan.jcache.JCacheManager.configureCache(JCacheManager.java:238)
      at org.infinispan.jcache.annotation.InjectedCacheResolver.getCacheFromDefaultCacheManager(InjectedCacheResolver.java:105)
      at org.infinispan.jcache.annotation.InjectedCacheResolver.resolveCache(InjectedCacheResolver.java:97)
      at org.infinispan.jcache.annotation.InjectedCacheResolver$Proxy$$$_WeldClientProxy.resolveCache(InjectedCacheResolver$Proxy$$$_WeldClientProxy.java)
      at org.infinispan.jcache.annotation.AbstractCacheResultInterceptor.cacheResult(AbstractCacheResultInterceptor.java:56)
      at org.infinispan.jcache.annotation.InjectedCacheResultInterceptor.cacheResult(InjectedCacheResultInterceptor.java:33)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30)
      at org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:69)
      at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:112)
      at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:88)
      at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:55)
      at org.infinispan.quickstart.cdi.GreetingService$Proxy$$$_WeldSubclass.greetDefaultCacheConfigTwo(GreetingService$Proxy$$$_WeldSubclass.java)
      at org.infinispan.quickstart.cdi.GreetingController.greet(GreetingController.java:58)
      at org.infinispan.quickstart.cdi.GreetingController$Proxy$$$_WeldClientProxy.greet(GreetingController$Proxy$$$_WeldClientProxy.java)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.el.parser.AstValue.invoke(AstValue.java:258)
      at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
      ... 21 more

              slaskawi@redhat.com Sebastian Ɓaskawiec (Inactive)
              marcio.dantas_jira Marcio Dantas (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: