4 Replies Latest reply on Feb 5, 2014 9:30 AM by shahhemal

    NPE in CacheLoaderInterceptor

    shahhemal

      At runtime when I am trying to access the cache (distributed). Then I get following exception. Accessing same cache works fine from other JVM where different app is deployed. Please help in giving any pointers as to why I am getting following exception. I am using 5.1.6 version.

       

      <2014-01-29 11:52:50,081> <> <ERROR> <> <> <> <RMI TCP Connection(21)-10.34.32.244> <> <> <null> <org.infinispan.interceptors.InvocationContextInterceptor> - <ISPN000136: Execution error>

      java.lang.NullPointerException

          at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:148)

          at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:208)

          at org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:98)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

          at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:113)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

          at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitGetKeyValueCommand(NonTransactionalLockingInterceptor.java:57)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)

          at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:104)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

          at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:94)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

          at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)

          at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)

          at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:104)

          at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60)

          at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)

          at org.infinispan.CacheImpl.get(CacheImpl.java:278)

          at org.infinispan.CacheImpl.get(CacheImpl.java:270)

          at com.intralinks.commons.caching.InfinispanCacheProvider.get(InfinispanCacheProvider.java:30)

          at com.intralinks.commons.caching.CacheService.get(CacheService.java:51)

          at com.intralinks.core.client.application.ClientApplicationDAO.isValidClientAppId(ClientApplicationDAO.java:81)

          at com.intralinks.core.client.application.ClientApplicationDAO$$FastClassByCGLIB$$bc0b42c5.invoke(<generated>)

          at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

          at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

          at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)

          at com.intralinks.core.client.application.ClientApplicationDAO$$EnhancerByCGLIB$$ba5df08.isValidClientAppId(<generated>)

          at com.intralinks.core.client.application.ClientApplicationMBean.validClientAppId(ClientApplicationMBean.java:192)

          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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)

          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 sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)

          at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1249)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

          at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1243)

          at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1081)

          at org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

          at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)

          at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)

          at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)

          at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)

          at java.security.AccessController.doPrivileged(Native Method)

          at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)

          at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)

          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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

          at sun.rmi.transport.Transport$1.run(Transport.java:177)

          at sun.rmi.transport.Transport$1.run(Transport.java:174)

          at java.security.AccessController.doPrivileged(Native Method)

          at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:744)

       

       

       

      I found following where this same error is discussed. But, not sure whether it is happening same way as it's happening for me. However, it says that fix is available in version 6.0. Can someone please confirm?

      https://bugzilla.redhat.com/show_bug.cgi?id=745923

        • 1. Re: NPE in CacheLoaderInterceptor
          nadirx

          The 6.0 in that Bugzilla refers to the version of JBoss Data Grid, our commercial offering based on Infinispan. Please use at least Infinispan 5.2 (which is the one used by JDG 6.0), or even better Infinispan 6.0.

          • 2. Re: NPE in CacheLoaderInterceptor
            shahhemal

            Thanks a lot!! Tristan for reply.

             

            By any chance do know why I might be getting this error? As I don't see this same issue with other nodes in my system. Happening only on one of them.

             

            And can I use version 6.0 without Jboss support contract? Or that is the version from which JBoss have started  providing support from? And therefore getting support is optional?

            • 3. Re: NPE in CacheLoaderInterceptor
              nadirx

              It was a problem due to wrong initialization order of components, i.e. the cacheloaderinterceptor is getting initialized before the cacheloadermanager and therefore it is getting a null cacheloader.

               

              As for versions: Infinispan and JBoss Data Grid are versioned differently.

              Infinispan is the community version and the latest release is 6.0

              JBoss Data Grid is the supported version and the latest release is 6.2 (based on Infinispan 6.0).

               

              I hope this helps.

               

              Tristan

              • 4. Re: NPE in CacheLoaderInterceptor
                shahhemal

                Thanks a lot!! for clarification. It is quiet helpful.

                 

                Thanks!!