javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.

Spring JIRA | Eugene Prokopiev | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    SPR-2461 must be reopened. All works with default DefaultMessageListenerContainer.cacheLevel=CACHE_SESSION but thre are some errors with other cacheLevel values. In the same configuration described in SPR-2461 I got: with CACHE_CONNECTION on starting context: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Already closed at org.jencks.pool.PooledSpringXAConnection.getConnection(PooledSpringXAConnection.java:284) at org.jencks.pool.PooledSpringXAConnection.start(PooledSpringXAConnection.java:95) at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:195) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:483) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection with CACHE_SESSION and CACHE_CONSUMER on receiving message: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction. at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109) at org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658) at org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610) at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection

    Spring JIRA | 1 decade ago | Eugene Prokopiev
    javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.
  2. 0

    SPR-2461 must be reopened. All works with default DefaultMessageListenerContainer.cacheLevel=CACHE_SESSION but thre are some errors with other cacheLevel values. In the same configuration described in SPR-2461 I got: with CACHE_CONNECTION on starting context: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Already closed at org.jencks.pool.PooledSpringXAConnection.getConnection(PooledSpringXAConnection.java:284) at org.jencks.pool.PooledSpringXAConnection.start(PooledSpringXAConnection.java:95) at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:195) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:483) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection with CACHE_SESSION and CACHE_CONSUMER on receiving message: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction. at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109) at org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658) at org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610) at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection

    Spring JIRA | 1 decade ago | Eugene Prokopiev
    javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.
  3. 0

    ActiveMQ - User - java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

    nabble.com | 8 months ago
    javax.jms.JMSException: Peer (vm://localhost#1) disposed. at > org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at > org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1154) at > org.apache.activemq.AdvisoryConsumer.dispose(AdvisoryConsumer.java:56) at > org.apache.activemq.ActiveMQConnection.cleanup(ActiveMQConnection.java:1326) at > org.apache.activemq.ActiveMQConnection.transportFailed(ActiveMQConnection.java:2027) at > org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1663) at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [ActiveMQ-users] right config for activeMQ to handle persisted messages through Oracle - Grokbase

    grokbase.com | 2 years ago
    javax.jms.JMSException: Cannot remove a consumer from a connection that had not been registered: ID:vhmucj3.helios.cp-55010-1322581269935-2:7 at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppor t.java:49) at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnec tion.java:1784) at org.apache.activemq.ActiveMQConnection$2$1.run(ActiveMQConnection.java :1705) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu tor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor. java:919)
  6. 0

    ActiveMQ - User - can't deserialize proxy instance with non-jdk interface

    nabble.com | 1 year ago
    javax.jms.JMSException: Failed to build body from content. > Serializable class not available to broker. Reason: > java.lang.ClassNotFoundException. Message: ActiveMQObjectMessage > {commandId = 19, responseRequired = true, messageId = > ID:rsi-eng-newsham-56811-1289358131963-0:2:3:1:3, originalDestination > = null, originalTransactionId = null, producerId = > ID:rsi-eng-newsham-56811-1289358131963-0:2:3:1, destination = > queue://ServiceExport, transactionId = null, expiration = > 1289358177656, timestamp = 1289358157656, arrival = 0, brokerInTime = > 1289358157656, brokerOutTime = 1289358157658, correlationId = > 215512f0-0d7e-4f3c-8cc2-5e459d59b582, replyTo = > temp-queue://ID:rsi-eng-newsham-56811-1289358131963-0:2:1, persistent > = true, type = null, priority = 4, groupID = null, groupSequence = 0, > targetConsumerId = null, compressed = false, userID = null, content = > org.apache.activemq.util.ByteSequence@115e628, marshalledProperties = > org.apache.activemq.util.ByteSequence@b977bc, dataStructure = null, > redeliveryCounter = 0, size = 1860, properties = > {sessionId=04fd4b1b-0a01-40f7-8bf8-fda514c773e9}, readOnlyProperties = > true, readOnlyBody = true, droppable = false} at > org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:158) at > org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:183) at > org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:42) at > org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:65) at > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:90) at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68) at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91) at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85) at > org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:85) at > org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543) at > org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482) at > org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451) at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323) at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261) at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982) at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974) at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.jms.JMSException

      Session's XAResource has not been enlisted in a distributed transaction.

      at org.apache.activemq.ActiveMQXASession.doStartTransaction()
    2. ActiveMQ :: Core
      ActiveMQMessageConsumer.receive
      1. org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109)
      2. org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658)
      3. org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610)
      4. org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469)
      4 frames
    3. Spring Framework
      DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run
      1. org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560)
      2. org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505)
      3. org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441)
      4. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859)
      5. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818)
      5 frames
    4. Spring Core
      SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run
      1. org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame