[infinispan-issues] [JBoss JIRA] (ISPN-1503) Invocation batching with transaction mode NON_TRANSACTIONAL should not be allowed.
Galder Zamarreño (Updated) (JIRA)
jira-events at lists.jboss.org
Tue Nov 22 03:27:42 EST 2011
[ https://issues.jboss.org/browse/ISPN-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreño updated ISPN-1503:
-----------------------------------
Fix Version/s: 5.1.0.CR1
(was: 5.1.0.BETA5)
> Invocation batching with transaction mode NON_TRANSACTIONAL should not be allowed.
> ----------------------------------------------------------------------------------
>
> Key: ISPN-1503
> URL: https://issues.jboss.org/browse/ISPN-1503
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.1.0.BETA3
> Reporter: Aaron Douglas
> Assignee: Pete Muir
> Fix For: 5.1.0.CR1
>
>
> When setting a cache to non-transactional with the following configuration statement:
> {code:xml}
> <transaction transactionMode="NON_TRANSACTIONAL" />
> {code}
> I'm getting a NullPointerException in org.infinispan.interceptors.BatchingInterceptor.handleDefault(InvocationContext, VisitableCommand) because there is no transaction manager defined. This is occurring in the fifth line below:
> {code}
> protected Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable {
> Transaction tx;
> if (!ctx.isOriginLocal()) return invokeNextInterceptor(ctx, command);
> // if in a batch, attach tx
> if (transactionManager.getTransaction() == null && (tx = batchContainer.getBatchTransaction()) != null) {
> try {
> transactionManager.resume(tx);
> //If there's no ongoing tx then BatchingInterceptor creates one and then invokes next interceptor,
> // so that all interceptors in the stack will be executed in a transactional context.
> // This is where a new context (TxInvocationContext) is created, as the existing context is not transactional: NonTxInvocationContext.
> InvocationContext txContext = icc.createInvocationContext(true);
> txContext.setFlags(ctx.getFlags());
> return invokeNextInterceptor(txContext, command);
> } finally {
> if (transactionManager.getTransaction() != null && batchContainer.isSuspendTxAfterInvocation())
> transactionManager.suspend();
> }
> } else {
> return invokeNextInterceptor(ctx, command);
> }
> }
> {code}
> And the stacktrace:
> {noformat}
> Caused by: java.lang.NullPointerException
> at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:63) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:95) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:61) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:318) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.CacheImpl.get(CacheImpl.java:262) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.DecoratedCache.get(DecoratedCache.java:292) [infinispan-core-5.1.0.BETA3.jar:]
> at org.infinispan.lucene.FileListOperations.getFileList(FileListOperations.java:55) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
> at org.infinispan.lucene.InfinispanDirectory.list(InfinispanDirectory.java:183) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
> at org.infinispan.lucene.InfinispanDirectory.listAll(InfinispanDirectory.java:338) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
> at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:623) [lucene-core-3.1.0.jar:]
> at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:575) [lucene-core-3.1.0.jar:]
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:346) [lucene-core-3.1.0.jar:]
> at org.apache.lucene.index.IndexReader.indexExists(IndexReader.java:808) [lucene-core-3.1.0.jar:]
> at org.hibernate.search.store.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:157) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.search.infinispan.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:88) [hibernate-search-infinispan-3.4.1.Final.jar:]
> at org.hibernate.search.store.DirectoryProviderFactory.startDirectoryProviders(DirectoryProviderFactory.java:144) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:403) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:262) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:151) [hibernate-search-3.4.1.Final.jar:]
> at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198) [hibernate-core-3.6.6.Final.jar:]
> at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181) [hibernate-core-3.6.6.Final.jar:]
> at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194) [hibernate-core-3.6.6.Final.jar:]
> ... 40 more
> {noformat}
--
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
More information about the infinispan-issues
mailing list