3 Replies Latest reply on Sep 30, 2016 4:13 PM by Paul Ferraro

    Infinispan filestore not working in Wildfly 10.0

    mstein921 Newbie

      Hi all,

       

      we are trying to migrate a project from wildfly 9.0.2 to wildfly 10.0.0.

      And now we have the problem that local-caches with file-store configuration are not saved to disk anymore.

      We are using standalone mode with standalone-full.xml.

       

      I found exact the same problem here: java - Infinispan not keep cache in file Wildfly 10 - Stack Overflow

      The suggestion from Paul does not work for me.

      I tried:

      @Resource(lookup = "java:jboss/infinispan/cache/server/default")
      private Cache<UUID, Date> cache;

      and also

      @Resource(lookup = "java:jboss/infinispan/container/server/default")
      private Cache<UUID, Date> cache;

      but get only exception:

      java.lang.IllegalArgumentException: WFLYWELD0049: Error injecting resource into CDI managed bean. Can't find a resource named java:jboss/infinispan/container/server/default defined on private org.infinispan.Cache org.storetest.CacheAccess.cache

        at org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices.resolveResource(WeldResourceInjectionServices.java:216)

        at org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices$1.createResource(WeldResourceInjectionServices.java:162)

        at org.jboss.weld.injection.AbstractResourceInjection.getResourceReference(AbstractResourceInjection.java:49)

        at org.jboss.weld.injection.AbstractResourceInjection.injectResourceReference(AbstractResourceInjection.java:63)

        at org.jboss.weld.util.Beans.injectEEFields(Beans.java:351)

        at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)

        at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)

        at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:121)

        at org.jboss.resteasy.cdi.JaxrsInjectionTarget.inject(JaxrsInjectionTarget.java:44)

        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)

        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)

        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)

        at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.get(ContextualInstanceStrategy.java:178)

        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)

        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)

        at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)

        at org.storetest.CacheAccess$Proxy$_$$_WeldClientProxy.test(Unknown Source)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)

        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)

        ... 32 more

      Caused by: javax.naming.NotContextException: infinispan/container/server

        at org.jboss.as.naming.util.NamingUtils.notAContextException(NamingUtils.java:139)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:230)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)

        at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:237)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)

        at javax.naming.InitialContext.lookup(InitialContext.java:417)

        at javax.naming.InitialContext.lookup(InitialContext.java:417)

        at org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices.resolveResource(WeldResourceInjectionServices.java:214)

        ... 58 more

       

      I hope someone can help with this issue.

       

      Best regards

      Michael