1 Reply Latest reply on Sep 29, 2011 3:54 AM by galder.zamarreno

    Infinispan as Hibernate 2LC: NamedCacheNotFoundException

    jeha

      I currently use JBossCache 3.2 als a Hibernate 2nd level cache for clustered caching of entities in a EJB3 environment (glassfish 2) which runs fine. Now I'm evaluating using Infinispan 4.2.1 instead and to my surprise I get `NamedCacheNotFoundException`s.

       

      I use annotations at entity level like

       

         @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL, region = "myRegion")

       

      and the exeptions are like

       

          org.infinispan.CacheException: org.infinispan.manager.NamedCacheNotFoundException: Cache: myRegion

            at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:115)

            at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:126)

            at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:231)

            at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:218)

            at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:201)

            at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:194)

            at org.infinispan.interceptors.InvalidationInterceptor.invalidateAcrossCluster(InvalidationInterceptor.java:220)

            ....

       

      Looking via jmx I can see a corresponding MBean but it's `CacheName` is like `myRegion(invalidation_sync)`. The suffix `(invalidation_sync)` seems to be added by Infinispan.

       

      Is this the root cause of my problem? How to come around it? My Infinispan config is largely the one that comes with hibernate-infinsipan but with jmx enabled.