[jboss-jira] [JBoss JIRA] Created: (JBCACHE-1375) NPE in ActivationInterceptor
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Jun 19 22:03:08 EDT 2008
NPE in ActivationInterceptor
----------------------------
Key: JBCACHE-1375
URL: http://jira.jboss.com/jira/browse/JBCACHE-1375
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Cache loaders
Affects Versions: 2.2.0.CR4
Reporter: Brian Stansberry
Assigned To: Manik Surtani
Using the current head of the 2.2.X branch, am seeing the following in tests of FIELD granularity web session replication with buddy replication enabled:
java.lang.NullPointerException
at org.jboss.cache.notifications.NotifierImpl.notifyNodeActivated(NotifierImpl.java:387)
at org.jboss.cache.interceptors.ActivationInterceptor$ActivationModificationsBuilder.addRemoveMod(ActivationInterceptor.java:374)
at org.jboss.cache.interceptors.ActivationInterceptor$ActivationModificationsBuilder.handlePutCommand(ActivationInterceptor.java:351)
at org.jboss.cache.interceptors.ActivationInterceptor$ActivationModificationsBuilder.visitPutDataMapCommand(ActivationInterceptor.java:322)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:89)
at org.jboss.cache.commands.AbstractVisitor.visitCollection(AbstractVisitor.java:158)
at org.jboss.cache.interceptors.ActivationInterceptor.prepareCacheLoader(ActivationInterceptor.java:297)
at org.jboss.cache.interceptors.ActivationInterceptor.visitPrepareCommand(ActivationInterceptor.java:233)
at org.jboss.cache.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:46)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142)
at org.jboss.cache.interceptors.PessimisticLockInterceptor.handlePrepareCommand(PessimisticLockInterceptor.java:125)
at org.jboss.cache.interceptors.base.PostProcessingCommandInterceptor.visitPrepareCommand(PostProcessingCommandInterceptor.java:347)
at org.jboss.cache.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:46)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142)
at org.jboss.cache.interceptors.ReplicationInterceptor.visitPrepareCommand(ReplicationInterceptor.java:42)
at org.jboss.cache.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:46)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142)
at org.jboss.cache.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:29)
at org.jboss.cache.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:46)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142)
at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:690)
at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1098)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:60)
at org.jboss.cache.transaction.DummyTransaction.notifyBeforeCompletion(DummyTransaction.java:261)
at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:61)
at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:78)
at org.jboss.web.tomcat.service.session.BatchReplicationClusteredSessionValve.invoke(BatchReplicationClusteredSessionValve.java:106)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:87)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:325)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
NPE is due to a null InvocationContext passed to the final method. Walking through the stack trace, the null ctx arises from ActivationInterceptor.prepareCacheLoader:
private void prepareCacheLoader(InvocationContext ctx) throws Throwable
{
GlobalTransaction gtx = ctx.getGlobalTransaction();
TransactionEntry entry = ctx.getTransactionEntry();
if (entry == null)
{
throw new Exception("entry for transaction " + gtx + " not found in transaction table");
}
List<Modification> cacheLoaderModifications = new ArrayList<Modification>();
builder.visitCollection(null, entry.getModifications()); // <-- NULL PARAM VALUE
if (cacheLoaderModifications.size() > 0)
{
loader.prepare(gtx, cacheLoaderModifications, false);
}
}
I've no idea what this code is doing, so can't comment beyond that. :-)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list