[
https://issues.jboss.org/browse/ISPN-7595?page=com.atlassian.jira.plugin....
]
Radim Vansa commented on ISPN-7595:
-----------------------------------
Hi, thanks for reporting. I'll take a look, but please create a JIRA in Hibernate
tracker (
https://hibernate.atlassian.net/ ).
UnsupportedOperationException is thrown when persist + flush + dirty
entity + commit
------------------------------------------------------------------------------------
Key: ISPN-7595
URL:
https://issues.jboss.org/browse/ISPN-7595
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.2.6.Final
Environment: Any OS
Java 8
Hibernate 5.2.8.Final
Infinispan 8.2.6.Final
Reporter: Allan Jones
Assignee: Radim Vansa
Attachments: MyApp.zip
When using hibernate with JTA and Infinispan the following exception occurs:
{code}
Exception in thread "main"
org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly
rolled back (maybe due to a timeout); nested exception is
javax.transaction.RollbackException: The transaction was set to rollback only
at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1026)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
at com.myapp.services.MyService.reproduceIssue(MyService.java:35)
at com.myapp.App.main(App.java:13)
Caused by: javax.transaction.RollbackException: The transaction was set to rollback only
at
com.atomikos.icatch.jta.TransactionImp.rethrowAsJtaRollbackException(TransactionImp.java:66)
at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:207)
at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:433)
at com.atomikos.icatch.jta.J2eeUserTransaction.commit(J2eeUserTransaction.java:94)
at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1023)
... 4 more
Caused by: java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:148)
at java.util.AbstractList.add(AbstractList.java:108)
at
org.infinispan.transaction.impl.LocalTransaction.addModification(LocalTransaction.java:64)
at
org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:380)
at
org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:221)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
at
org.infinispan.interceptors.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:191)
at
org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:177)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
at
org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:43)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
at
org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1685)
at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1134)
at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1124)
at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:453)
at
org.hibernate.cache.infinispan.access.TxInvalidationCacheAccessDelegate.update(TxInvalidationCacheAccessDelegate.java:53)
at
org.hibernate.cache.infinispan.entity.ReadWriteAccess.update(ReadWriteAccess.java:29)
at
org.hibernate.action.internal.EntityUpdateAction.cacheUpdate(EntityUpdateAction.java:222)
at
org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:196)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:586)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:460)
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1428)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:484)
at
org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3190)
at
org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2404)
at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:467)
at
org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:320)
at
org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:47)
at
org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:37)
at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:50)
at
com.atomikos.icatch.imp.TransactionStateHandler.notifyBeforeCompletion(TransactionStateHandler.java:261)
at
com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:236)
at
com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:288)
at
com.atomikos.icatch.imp.CompositeTransactionImp.commit(CompositeTransactionImp.java:337)
at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:191)
... 7 more
{code}
This was found when migrating from Hibernate 4.3.x / Infinispan 7.2.x to Hibernate 5.2.8
and Infinispan 8.2.6
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)