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

NPE in InfinispanCollections.containsAny

    XMLWordPrintable

Details

    Description

      When having partition handling enabled on a replicated cache, a null pointer exception is thrown in the post operation partition check because the ClusteringDependentLogic.getOwners(key) returns null.

      Here's the line it's thrown:
      https://github.com/infinispan/infinispan/blob/master/commons/src/main/java/org/infinispan/commons/util/InfinispanCollections.java#L309

      Here's the calling line:
      https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/partitionhandling/impl/PartitionHandlingInterceptor.java#L149

      Relevant stack trace:

      java.lang.NullPointerException
      	at org.infinispan.commons.util.InfinispanCollections.containsAny(InfinispanCollections.java:309) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.postOperationPartitionCheck(PartitionHandlingInterceptor.java:149) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.visitGetKeyValueCommand(PartitionHandlingInterceptor.java:114) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:39) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:77) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:39) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:233) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.statetransfer.StateTransferInterceptor.handleDefault(StateTransferInterceptor.java:217) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:77) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:39) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.CacheMgmtInterceptor.visitDataReadCommand(CacheMgmtInterceptor.java:103) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:91) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:39) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:102) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:77) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:39) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.cache.impl.CacheImpl.containsKey(CacheImpl.java:391) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at org.infinispan.cache.impl.CacheImpl.containsKey(CacheImpl.java:384) ~[infinispan-embedded-7.0.3.Final.jar:7.0.3.Final]
      	at com.redprairie.moca.cluster.manager.AbstractClusterRoleManager$RoleUpdater.run(AbstractClusterRoleManager.java:671) ~[moca-server.jar:?]
      	at com.redprairie.moca.util.ExceptionSuppressingRunnable.run(ExceptionSuppressingRunnable.java:47) ~[moca-server.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.7.0_67]
      	at java.util.concurrent.FutureTask.runAndReset(Unknown Source) ~[?:1.7.0_67]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) ~[?:1.7.0_67]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.7.0_67]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_67]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_67]
      	at java.lang.Thread.run(Unknown Source) [?:1.7.0_67]
      

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei
            kurtymckurt Kurt Lehrke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: