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

Using cache loader preload with DIST triggers NPE

XMLWordPrintable

      As illustrated by the stacktrace below, the DistributionManagerImpl's ConsistentHash hasn't been set yet, causing an NPE.

      Oct 19, 2011 3:08:16 PM org.infinispan.interceptors.InvocationContextInterceptor handleAll
      ERROR: ISPN000136: Execution error
      java.lang.NullPointerException
      at org.infinispan.distribution.DistributionManagerImpl.getLocality(DistributionManagerImpl.java:120)
      at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.localNodeIsOwner(ClusteringDependentLogic.java:85)
      at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.commitEntry(ClusteringDependentLogic.java:92)
      at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:172)
      at org.infinispan.interceptors.EntryWrappingInterceptor.visitCommitCommand(EntryWrappingInterceptor.java:94)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitCommitCommand(AbstractTxLockingInterceptor.java:47)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.NotificationInterceptor.visitCommitCommand(NotificationInterceptor.java:56)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133)
      at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:116)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:121)
      at org.infinispan.interceptors.DistTxInterceptor.visitCommitCommand(DistTxInterceptor.java:77)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133)
      at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:116)
      at org.infinispan.interceptors.StateTransferLockInterceptor.visitCommitCommand(StateTransferLockInterceptor.java:86)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64)
      at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:116)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133)
      at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:116)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119)
      at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:77)
      at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:116)
      at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:318)
      at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:134)
      at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:127)
      at org.infinispan.transaction.tm.DummyTransaction.runCommitTx(DummyTransaction.java:312)
      at org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:99)
      at org.infinispan.transaction.tm.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:97)
      at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:913)
      at org.infinispan.CacheImpl.put(CacheImpl.java:620)
      at org.infinispan.DecoratedCache.put(DecoratedCache.java:147)
      at org.infinispan.loaders.CacheLoaderManagerImpl.preload(CacheLoaderManagerImpl.java:162)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203)
      at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:825)
      at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:624)
      at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:527)
      at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:177)
      at org.infinispan.CacheImpl.start(CacheImpl.java:462)
      at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:572)
      at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:451)
      at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:424)
      at org.jboss.as.web.session.SessionTestUtil$3.getCache(SessionTestUtil.java:214)
      at org.jboss.as.web.session.SessionTestUtil$1.getCache(SessionTestUtil.java:116)
      at org.jboss.as.clustering.web.infinispan.DistributedCacheManagerFactory.getDistributedCacheManager(DistributedCacheManagerFactory.java:83)
      at org.jboss.as.web.session.DistributableSessionManager.<init>(DistributableSessionManager.java:176)
      at org.jboss.as.web.session.SessionTestUtil.createManager(SessionTestUtil.java:130)
      at org.jboss.as.web.session.SessionCountUnitTestCase.replicatedWarRedeployTest(SessionCountUnitTestCase.java:645)
      at org.jboss.as.web.session.SessionCountUnitTestCase.testReplicatedRestart(SessionCountUnitTestCase.java:556)

              dberinde@redhat.com Dan Berindei (Inactive)
              pferraro@redhat.com Paul Ferraro
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: