[
https://issues.jboss.org/browse/ISPN-1922?page=com.atlassian.jira.plugin....
]
Work on ISPN-1922 started by Galder Zamarreño.
New configuration API bug hiding a NPE in
VersionedEntryWrappingInterceptor
---------------------------------------------------------------------------
Key: ISPN-1922
URL:
https://issues.jboss.org/browse/ISPN-1922
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 5.1.2.FINAL
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Labels: versioning
Fix For: 5.1.3.CR1, 5.1.3.FINAL
While doing ISPN-1367 and converting the internals to new configuration, I've found
two bugs.
Basically, there's a bug in the new-to-old configuration transformation (ISPN-1922)
that makes FlagsEnabledTest pass when it shouldn't.
To be precise, that test enables configuration such as:
{code}.versioning().enable().scheme(VersioningScheme.SIMPLE){code}
But, in the InterceptorChainFactory, needsVersionAwareComponents returns false
(configuration.isEnableVersioning() = false):
{code}boolean needsVersionAwareComponents = configuration.isTransactionalCache()
&& configuration.isWriteSkewCheck() &&
configuration.getTransactionLockingMode() == LockingMode.OPTIMISTIC &&
configuration.isEnableVersioning();{code}
By changing the internals to the config, the configuration.isEnableVersioning() returns
true and so FlagsEnabledTest.testWithFlagsSemantics fails with:
{code}2012-03-16 15:12:42,337 ERROR [InvocationContextInterceptor] (main) ISPN000136:
Execution error
java.lang.NullPointerException
at
org.infinispan.interceptors.VersionedEntryWrappingInterceptor.commitContextEntry(VersionedEntryWrappingInterceptor.java:94)
at
org.infinispan.interceptors.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:271)
at
org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:182)
at
org.infinispan.interceptors.VersionedEntryWrappingInterceptor.visitCommitCommand(VersionedEntryWrappingInterceptor.java:87)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121)
at
org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitCommitCommand(AbstractTxLockingInterceptor.java:105)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at
org.infinispan.interceptors.NotificationInterceptor.visitCommitCommand(NotificationInterceptor.java:65)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:120)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at
org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:207)
at
org.infinispan.interceptors.StateTransferLockInterceptor.visitCommitCommand(StateTransferLockInterceptor.java:120)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:130)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:89)
at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121)
at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
at
org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:182)
at
org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:125)
at
com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:667)
at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2283)
at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1466)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:98)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
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:117)
at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:955)
at org.infinispan.CacheImpl.put(CacheImpl.java:659)
at org.infinispan.DecoratedCache.put(DecoratedCache.java:319)
at
org.infinispan.api.flags.FlagsEnabledTest.testWithFlagsSemantics(FlagsEnabledTest.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597){code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira