[infinispan-dev] NPE on boot when using preload

Galder Zamarreño galder at redhat.com
Thu Jan 17 03:49:20 EST 2013


An NPE is a bug, can you fill one in http://issues.jboss.org/browse/ISPN ?

If you can enable TRACE on org.infinispan package and attach logs for both nodes even better :)

Cheers,

On Jan 15, 2013, at 4:37 PM, Matej Lazar <mlazar at redhat.com> wrote:

> 
> To reproduce NPE start CapeDwarf twice with sample app and enabled preload for cache capedwarf/dist
> <cache-container name="capedwarf" default-cache="default">
> ...
> <distributed-cache name="dist" mode="ASYNC">
> 	<transaction mode="NON_XA" locking="PESSIMISTIC"/>
> 	<eviction strategy="LIRS" max-entries="100000"/>
> 	<file-store preload="true" purge="false"/>
> </distributed-cache>
> 
> 
> After some debuging, find out that
> in org.infinispan.distribution.DistributionManagerImpl.getLocality
> stateTransferManager.getCacheTopology() returns null
> https://github.com/infinispan/infinispan/blob/5.2.0.CR1/core/src/main/java/org/infinispan/distribution/DistributionManagerImpl.java#L113
> 
> looks like onTopologyUpdate must be called first, but it is not
> 
> org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate
> https://github.com/infinispan/infinispan/blob/5.2.0.CR1/core/src/main/java/org/infinispan/statetransfer/StateConsumerImpl.java#L251 
> 
> 
> 
> 16:04:20,190 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started metadata_todolist cache from capedwarf container
> 16:04:20,192 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-7) JBAS010281: Started memcache_todolist cache from capedwarf container
> 16:04:20,195 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-8) JBAS010281: Started data_todolist cache from capedwarf container
> 16:04:20,212 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-2) ISPN000136: Execution error: java.lang.NullPointerException
> 	at org.infinispan.distribution.DistributionManagerImpl.getLocality(DistributionManagerImpl.java:113) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.localNodeIsOwner(ClusteringDependentLogic.java:181) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.commitEntry(ClusteringDependentLogic.java:209) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:270) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:371) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:257) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:108) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:107) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:103) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:131) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:189) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:93) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:175) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
> 	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
> 	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
> 	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
> 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
> 	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
> 	at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
> 	at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1156) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.CacheImpl.putInternal(CacheImpl.java:744) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.CacheImpl.put(CacheImpl.java:738) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.DecoratedCache.put(DecoratedCache.java:180) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.loaders.CacheLoaderManagerImpl.preload(CacheLoaderManagerImpl.java:258) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09-icedtea]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09-icedtea]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]
> 	at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea]
> 	at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:883) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:654) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:643) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:546) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:199) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.CacheImpl.start(CacheImpl.java:557) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:689) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:652) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:548) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:562) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
> 	at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:107) [jboss-as-clustering-infinispan-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
> 	at org.jboss.as.capedwarf.services.CacheLifecycleService.start(CacheLifecycleService.java:82) [jboss-as-capedwarf-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09-icedtea]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
> 
> 
> Matej.
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list