javax.jms.IllegalStateException: The session is closed.

MuleSoft JIRA | Vijay Kumar | 3 years ago
  1. 0

    I am using TransactedPollingJmsMessageReceiver to poll the Sonic MQ at regular intervals. I am using below configuration : <!-- Sonic MQ Broker Configuration --> <jms:connector name="jmsConnector" jndiInitialFactory="${jndi.initialFactoryClass}" connectionFactoryJndiName="${jndi.connectionFactoryName}" jndiProviderUrl="${jms.brokerURL}" username="${jms.username}" password="${jms.password}" persistentDelivery="true" maxRedelivery="2" numberOfConcurrentTransactedReceivers="5" disableTemporaryReplyToDestinations="true" specification="1.1"> <spring:property name="connectionFactoryProperties"> <spring:map> <spring:entry key="connectID" value="" /> <spring:entry key="prefetchCount" value="10" /> <spring:entry key="prefetchThreshold" value="10" /> <spring:entry key="faultTolerant" value="false" /> <spring:entry key="persistentDelivery" value="true" /> <spring:entry key="maxDeliveryCount" value="2" /> <spring:entry key="loadBalancing" value="true" /> <spring:entry key="sequential" value="true" /> </spring:map> </spring:property> <service-overrides transactedMessageReceiver="com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver"/> </jms:connector> <flow name="XXX"> <jms:inbound-endpoint queue="${JMS_QUEUE}" exchange-pattern="one-way"> <jms:transaction action="ALWAYS_BEGIN"/> <properties> <spring:entry key="pollingFrequency" value="60000" /> </properties> </jms:inbound-endpoint> -------------------- -------------------- </flow> The polling is working fine but it is throwing below exceptions every time it polls the Sonic MQ. We are using licensed version of Mule 3.3.3. Please look into this issue. Appreciate your help on this. 2013-07-11 09:33:21,078 [[esb-mule-wrapper].jmsConnector.receiver.03] WARN com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver - Error in TX notification handler. javax.jms.IllegalStateException: The session is closed. at progress.message.jimpl.Session.getJMSObjectClosedException(Session.java:3341) at progress.message.jimpl.Session.rollback(Session.java:1499) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:322) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:297) at org.mule.context.notification.Sender.dispatch(Sender.java:40) at org.mule.context.notification.Policy.dispatch(Policy.java:122) at org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:249) at org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:200) at org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:435) at org.mule.transaction.AbstractTransaction.fireNotification(AbstractTransaction.java:144) at org.mule.transaction.AbstractTransaction.rollback(AbstractTransaction.java:98) at org.mule.transaction.AbstractSingleResourceTransaction.rollback(AbstractSingleResourceTransaction.java:85) at org.mule.transaction.TransactionCoordination.resolveTransaction(TransactionCoordination.java:214) at org.mule.execution.BeginAndResolveTransactionInterceptor.resolveTransactionIfRequired(BeginAndResolveTransactionInterceptor.java:77) at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:59) at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48) at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54) at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44) at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44) at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52) at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32) at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17) at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113) at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver.poll(TransactedPollingJmsMessageReceiver.java:109) at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:219) at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:84) at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:53) at org.mule.work.WorkerContext.run(WorkerContext.java:311) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662)

    MuleSoft JIRA | 3 years ago | Vijay Kumar
    javax.jms.IllegalStateException: The session is closed.
  2. 0

    I am using TransactedPollingJmsMessageReceiver to poll the Sonic MQ at regular intervals. I am using below configuration : <!-- Sonic MQ Broker Configuration --> <jms:connector name="jmsConnector" jndiInitialFactory="${jndi.initialFactoryClass}" connectionFactoryJndiName="${jndi.connectionFactoryName}" jndiProviderUrl="${jms.brokerURL}" username="${jms.username}" password="${jms.password}" persistentDelivery="true" maxRedelivery="2" numberOfConcurrentTransactedReceivers="5" disableTemporaryReplyToDestinations="true" specification="1.1"> <spring:property name="connectionFactoryProperties"> <spring:map> <spring:entry key="connectID" value="" /> <spring:entry key="prefetchCount" value="10" /> <spring:entry key="prefetchThreshold" value="10" /> <spring:entry key="faultTolerant" value="false" /> <spring:entry key="persistentDelivery" value="true" /> <spring:entry key="maxDeliveryCount" value="2" /> <spring:entry key="loadBalancing" value="true" /> <spring:entry key="sequential" value="true" /> </spring:map> </spring:property> <service-overrides transactedMessageReceiver="com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver"/> </jms:connector> <flow name="XXX"> <jms:inbound-endpoint queue="${JMS_QUEUE}" exchange-pattern="one-way"> <jms:transaction action="ALWAYS_BEGIN"/> <properties> <spring:entry key="pollingFrequency" value="60000" /> </properties> </jms:inbound-endpoint> -------------------- -------------------- </flow> The polling is working fine but it is throwing below exceptions every time it polls the Sonic MQ. We are using licensed version of Mule 3.3.3. Please look into this issue. Appreciate your help on this. 2013-07-11 09:33:21,078 [[esb-mule-wrapper].jmsConnector.receiver.03] WARN com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver - Error in TX notification handler. javax.jms.IllegalStateException: The session is closed. at progress.message.jimpl.Session.getJMSObjectClosedException(Session.java:3341) at progress.message.jimpl.Session.rollback(Session.java:1499) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:322) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:297) at org.mule.context.notification.Sender.dispatch(Sender.java:40) at org.mule.context.notification.Policy.dispatch(Policy.java:122) at org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:249) at org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:200) at org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:435) at org.mule.transaction.AbstractTransaction.fireNotification(AbstractTransaction.java:144) at org.mule.transaction.AbstractTransaction.rollback(AbstractTransaction.java:98) at org.mule.transaction.AbstractSingleResourceTransaction.rollback(AbstractSingleResourceTransaction.java:85) at org.mule.transaction.TransactionCoordination.resolveTransaction(TransactionCoordination.java:214) at org.mule.execution.BeginAndResolveTransactionInterceptor.resolveTransactionIfRequired(BeginAndResolveTransactionInterceptor.java:77) at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:59) at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48) at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54) at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44) at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44) at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52) at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32) at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17) at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113) at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34) at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver.poll(TransactedPollingJmsMessageReceiver.java:109) at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:219) at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:84) at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:53) at org.mule.work.WorkerContext.run(WorkerContext.java:311) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662)

    MuleSoft JIRA | 3 years ago | Vijay Kumar
    javax.jms.IllegalStateException: The session is closed.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Camel routes fail to recover ActiveMq connection when sharing a single connection

    Stack Overflow | 4 months ago | Harmony888
    javax.jms.IllegalStateException: The Session is closed

    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.IllegalStateException

      The session is closed.

      at progress.message.jimpl.Session.getJMSObjectClosedException()
    2. progress.message.jimpl
      Session.rollback
      1. progress.message.jimpl.Session.getJMSObjectClosedException(Session.java:3341)
      2. progress.message.jimpl.Session.rollback(Session.java:1499)
      2 frames
    3. com.mulesoft.mule
      TransactedPollingJmsMessageReceiver$2.onNotification
      1. com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:322)
      2. com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:297)
      2 frames
    4. Mule Core
      TransactionalErrorHandlingExecutionTemplate.execute
      1. org.mule.context.notification.Sender.dispatch(Sender.java:40)
      2. org.mule.context.notification.Policy.dispatch(Policy.java:122)
      3. org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:249)
      4. org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:200)
      5. org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:435)
      6. org.mule.transaction.AbstractTransaction.fireNotification(AbstractTransaction.java:144)
      7. org.mule.transaction.AbstractTransaction.rollback(AbstractTransaction.java:98)
      8. org.mule.transaction.AbstractSingleResourceTransaction.rollback(AbstractSingleResourceTransaction.java:85)
      9. org.mule.transaction.TransactionCoordination.resolveTransaction(TransactionCoordination.java:214)
      10. org.mule.execution.BeginAndResolveTransactionInterceptor.resolveTransactionIfRequired(BeginAndResolveTransactionInterceptor.java:77)
      11. org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:59)
      12. org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48)
      13. org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54)
      14. org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44)
      15. org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44)
      16. org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52)
      17. org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32)
      18. org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17)
      19. org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113)
      20. org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34)
      20 frames
    5. com.mulesoft.mule
      TransactedPollingJmsMessageReceiver.poll
      1. com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver.poll(TransactedPollingJmsMessageReceiver.java:109)
      1 frame
    6. Mule Core
      WorkerContext.run
      1. org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:219)
      2. org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:84)
      3. org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:53)
      4. org.mule.work.WorkerContext.run(WorkerContext.java:311)
      4 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      3. java.lang.Thread.run(Thread.java:662)
      3 frames