1 Reply Latest reply on Apr 25, 2016 5:17 AM by Galder Zamarreño

    ClusteringInterceptor throws NPE

    Thomas Houtekier Newbie

      I encoutered this nullpointerexception in infinispan:

      This is infinispan 7.2.3 in wildfly 9.0.2. The underlying transportstack is jgroups over udp

       

      Caused by: java.lang.NullPointerException
      at org.infinispan.interceptors.ClusteringInterceptor.needsRemoteGet(ClusteringInterceptor.java:70)
      at org.infinispan.interceptors.distribution.NonTxDistributionInterceptor.visitRemoteFetchingCommand(NonTxDistributionInterceptor.java:82)
      at org.infinispan.interceptors.distribution.NonTxDistributionInterceptor.visitGetKeyValueCommand(NonTxDistributionInterceptor.java:70)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.interceptors.EntryWrappingInterceptor.visitDataReadCommand(EntryWrappingInterceptor.java:130)
      at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:120)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataReadCommand(NonTransactionalLockingInterceptor.java:31)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitGetKeyValueCommand(AbstractLockingInterceptor.java:70)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111)
      at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:364)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleDefault(StateTransferInterceptor.java:349)
      at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.interceptors.CacheMgmtInterceptor.visitDataReadCommand(CacheMgmtInterceptor.java:103)
      at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:91)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:102)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71)
      at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86)
      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:336)
      at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:430)
      at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:422)
      at org.infinispan.cache.impl.AbstractDelegatingCache.get(AbstractDelegatingCache.java:287)
      
      

       

      I didn't find anything in the jira-project of infinispan (https://issues.jboss.org/browse/ISPN-6474?jql=project%20%3D%20ISPN)

      I found this similar forumpost about infinispan 6.3.0

      Any hints on what might cause this or how to work around it?

        • 1. Re: ClusteringInterceptor throws NPE
          Galder Zamarreño Master

          The other forum post mentioned is this. The Infinispan version used is the one that's shipped with Wildfly.

           

          The line that throws the NPE is this:

          ConsistentHash ch = stateTransferManager.getCacheTopology().getReadConsistentHash();

          Either stateTransferManager is null or getCacheTopology is returning null.

           

          I'd suggest that your application uses a more recent Infinispan version, say 8.2.1.Final or 9.0.0.Alpha1 and see if the issue is still present. You should not modify the Infinispan version in Wildfly but either add the new version to your deployment or install this Infinispan version's modules in the server and then add a dependency to the modules via jboss-deployment.xml or MANIFEST.