MuleSoft · JMS Connector
Session's XAResource has not been enlisted in a distributed transaction
Short answer
This ActiveMQ error appears when an XA connection or session is used outside a transaction on ActiveMQ 5.16.x and later. Run the XA work inside a transaction, or add jms.xaAckMode=1 to the broker URL.
VerifiedLast verified
01Error text
javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.02Likely causes
- ActiveMQ 5.16.x or later is used with an XA connection or XA session outside a transaction.
03How to fix it
- Run the XA-enabled operations inside a transaction.
- Or add the query parameter
jms.xaAckMode=1to the broker URL, for examplevm://localhost?jms.xaAckMode=1. - With ActiveMQ 5.16.x, use ActiveMQ driver 5.16.4 or later.
04Official documentation
→Related errors
- JMS:ACKJMS:ACK means an error happened while acknowledging an in-flight message. Review the acknowledgment mode and make sure every path through the flow either acknowledges the message or recovers the session.
- JMS:CONNECTIVITYJMS:CONNECTIVITY means the JMS connection is no longer valid, and the connector disposes of it. Check the broker and configure a reconnection strategy so the app reconnects by itself.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer