]
Galder Zamarreño updated ISPN-5223:
-----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 7.2.0.Beta1
7.2.0.Final
Resolution: Done
NPE in InfinispanCollections.containsAny
----------------------------------------
Key: ISPN-5223
URL:
https://issues.jboss.org/browse/ISPN-5223
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 7.1.0.Final
Reporter: Kurt Lehrke
Assignee: Dan Berindei
Fix For: 7.2.0.Beta1, 7.2.0.Final
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/jav...
Here's the calling line:
https://github.com/infinispan/infinispan/blob/master/core/src/main/java/o...
Relevant stack trace:
{code}
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]
{code}