0 Replies Latest reply on Jul 29, 2009 7:40 AM by arvind katoch

    Getting Exceptions on Server shutdown in JBoss 5 with Embedd

    arvind katoch Newbie

      I am using JBoss 5.1.0 GA with Embeded ActiveMQ 5.2.
      Everything is working fine. But when I am shutting down server(pressing ctrl C), during shutdown it is giving following exception.
      To me it seems to be JCA configuration issue or JBoss is being a little too aggressive with cleanup.Can some one tell where is the issue !!

      *****************8Stack trace *******************


      17:02:36,048 INFO [BrokerService] ActiveMQ Message Broker (localhost, ID:Akatoch-2254-1248866934362-0:0) is shutting down
      17:02:36,782 INFO [TxConnectionManager] throwable from unregister connection
      java.lang.NullPointerException
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:720)
      at org.apache.activemq.ra.ActiveMQManagedConnection.fireCloseEvent(ActiveMQManagedConnection.java:169)
      at org.apache.activemq.ra.ActiveMQManagedConnection.proxyClosedEvent(ActiveMQManagedConnection.java:380)
      at org.apache.activemq.ra.ManagedConnectionProxy.close(ManagedConnectionProxy.java:66)
      at org.springframework.jms.connection.ConnectionFactoryUtils.releaseConnection(ConnectionFactoryUtils.java:81)
      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:357)
      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:868)
      at java.lang.Thread.run(Unknown Source)
      17:02:36,782 INFO [DefaultMessageListenerContainer] Setup of JMS message listener invoker failed - trying to recover: javax.jms.JMSException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
      17:02:36,782 INFO [DefaultMessageListenerContainer] Could not refresh JMS Connection - retrying in 5000 ms: javax.jms.JMSException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
      17:02:38,048 INFO [TransportConnector] Connector tcp://localhost:61616 Stopped
      17:02:38,048 WARN [ActiveMQManagedConnection] Connection failed: javax.jms.JMSException: Peer (vm://localhost#0) disposed.
      17:02:38,048 INFO [TransportConnector] Connector vm://localhost Stopped
      17:02:38,048 INFO [AdvisoryConsumer] Failed to send remove command: javax.jms.JMSException: Peer (vm://localhost#1) disposed.
      javax.jms.JMSException: Peer (vm://localhost#1) disposed.
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
      at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1216)
      at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1208)
      at org.apache.activemq.AdvisoryConsumer.dispose(AdvisoryConsumer.java:56)
      at org.apache.activemq.ActiveMQConnection.cleanup(ActiveMQConnection.java:1404)
      at org.apache.activemq.ra.ActiveMQManagedConnection.cleanup(ActiveMQManagedConnection.java:235)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:341)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:724)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:463)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$BaseConnectionEventListener.connectionErrorOccurred(BaseConnectionManager2.java:854)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionErrorOccurred(TxConnectionManager.java:792)
      at org.apache.activemq.ra.ActiveMQManagedConnection.fireErrorOccurredEvent(ActiveMQManagedConnection.java:176)
      at org.apache.activemq.ra.ActiveMQManagedConnection.onException(ActiveMQManagedConnection.java:391)
      at org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1779)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
      at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:87)
      at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
      at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
      at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1214)
      ... 15 more
      17:02:38,048 WARN [JBossManagedConnectionPool] ResourceException cleaning up ManagedConnection: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6f0383[state=DESTROY mc=org.apache.activemq.ra.ActiveMQManagedConnection@1fd20fd handles=0 lastUse=1248866946877 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@180ce58 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@16b2a8b xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@b6377c txSync=null]
      javax.resource.ResourceException: Could cleanup the ActiveMQ connection: javax.jms.JMSException: Peer (vm://localhost#1) disposed.
      at org.apache.activemq.ra.ActiveMQManagedConnection.cleanup(ActiveMQManagedConnection.java:237)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:341)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:724)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:463)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$BaseConnectionEventListener.connectionErrorOccurred(BaseConnectionManager2.java:854)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionErrorOccurred(TxConnectionManager.java:792)
      at org.apache.activemq.ra.ActiveMQManagedConnection.fireErrorOccurredEvent(ActiveMQManagedConnection.java:176)
      at org.apache.activemq.ra.ActiveMQManagedConnection.onException(ActiveMQManagedConnection.java:391)
      at org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1779)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.jms.JMSException: Peer (vm://localhost#1) disposed.
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
      at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1216)
      at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1208)
      at org.apache.activemq.ActiveMQConnection.cleanup(ActiveMQConnection.java:1427)
      at org.apache.activemq.ra.ActiveMQManagedConnection.cleanup(ActiveMQManagedConnection.java:235)
      ... 11 more
      Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#1) disposed.
      at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:87)
      at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
      at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
      at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1214)
      ... 14 more
      17:02:38,173 INFO [BrokerService] ActiveMQ JMS Message Broker (localhost, ID:Akatoch-2254-1248866934362-0:0) stopped
      17:02:38,188 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
      17:02:38,188 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
      17:02:38,188 INFO [SimpleThreadPool] There are still 33 worker threads active. See javadoc runInThread(Runnable) for a possible explanation
      17:02:38,188 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
      17:02:38,548 INFO [TransactionManagerService] Stopping transaction recovery manager
      17:02:38,548 INFO [TransactionManagerService] Destroying TransactionManagerService
      17:02:39,157 INFO [HypersonicDatabase] Database standalone closed clean
      17:02:41,782 INFO [DefaultMessageListenerContainer] Could not refresh JMS Connection - retrying in 5000 ms: javax.jms.JMSException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
      17:02:46,782 INFO [DefaultMessageListenerContainer] Could not refresh JMS Connection - retrying in 5000 ms: javax.jms.JMSException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
      17:03:01,970 INFO [ServerImpl] Shutdown complete
      Shutdown complete
      Halting VM
      Terminate batch job (Y/N)?



      Thanks.