IllegalStateException: Trying to change transaction TransactionImple < ... ActionStatus.RUNNING > in enlist! in EAP
Issue
- Spring is managing transactions in the context of a web application (e.g. transactions demarcated by
@Transactionalclass and method annotations) - A method marked
REQUIREDis calling a method markedREQUIRES_NEW - When starting the new transaction, an enlistment failure warning is logged
11:44:36,301 WARN [org.jboss.tm.usertx.UserTransactionRegistry] (http-/127.0.0.1:8080-1) Error notifying listener org.jboss.jca.core.tx.jbossts.UserTransactionListenerImpl@4eb1250b of userTransactionStarted: java.lang.IllegalStateException: Trying to change transaction TransactionImple < ac, BasicAction: 0:ffffc0a80106:-b290450:54f5f2e1:17 status: ActionStatus.RUNNING > in enlist!
at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:304)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.transactionStarted(TxConnectionManagerImpl.java:383)
at org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManagerImpl.userTransactionStarted(CachedConnectionManagerImpl.java:211)
at org.jboss.jca.core.tx.jbossts.UserTransactionListenerImpl.userTransactionStarted(UserTransactionListenerImpl.java:52)
at org.jboss.tm.usertx.UserTransactionRegistry.userTransactionStarted(UserTransactionRegistry.java:119)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:151)
at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:866)
...
- The issue may also be reproducible in some circumstances using the UserTransaction.begin() API directly from application code, after suspending a running transaction (e.g. using the TransactionManager.suspend() API)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- Spring
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
