activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Exception while shutting down the embedded broker in Jboss:
Date Wed, 22 Jul 2009 14:21:57 GMT
you need to peek at the jboss source to see what is null in this case. What
versions are you using?

Just a thought but is the application that uses the resource adapter closing
off all connections?

2009/7/22 Chinmaya <chinmayaenator@gmail.com>

>
> I have externally configured Jboss as you suggested below.
>
> Is there a way to solve this ?
>
> Now i got the below exception :
>
> 16:55:34,484 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)
> 16:55:34,484 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.
> 16:55:34,484 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.
> 16:55:34,656 INFO  [TransactionManagerService] Stopping transaction
> recovery
> manager
> 16:55:34,687 INFO  [TransactionManagerService] Destroying
> TransactionManagerService
> 16:55:35,374 INFO  [HypersonicDatabase] Database standalone closed clean
> 16:55:39,562 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.
>
>
>
>
>
> Gary Tully wrote:
> >
> >> Yes every time i shutdown Jboss server this exception appears.
> >>
> >> One question : As you mentioned is there a way to change the order of
> >> shutdown such that broker should shutdown after Connection Factory
> >> Cleanup
> >> was done ?
> >>
> > This would require some internal code changes in the ActiveMQ resource
> > adapter. As it is reproducible, can you raise a jira issue for this.
> >
> >> how to configure ActiveMQ with Jboss externally ? can you provide me
> some
> >> links. I think this will solve this.
> >>
> > Note the comments in the ra.xml. Two variables need to be changed:
> >
> > Change <config-property-name>ServerUrl</config-property-name> from the
> vm:
> > url to the tcp: variant of the remote broker
> > and disable <config-property-name>BrokerXmlConfig</config-property-name>
> > which will prevent the initialisation of an embedded broker.
> >
> > Some more detail can be found in the ActiveMQ resource adapter
> > properties<http://activemq.apache.org/resource-adapter-properties.html
> >page
> >
> >>
> >> Gary Tully wrote:
> >>>
> >>> I changed that first info message to debug level on trunk yesterday,
> >>> it can be safely ignored.
> >>>
> >>> There seems to be an ordering problem between the embedded broker
> >>> shutdown and connection pool cleanup. Closing the connections is
> >>> failing because the embedded broker is already shutdown, or at least
> >>> its vm transport endpoint is shutdown at the time.
> >>>
> >>> For that reason the warn message is not too serious. I think it is
> >>> worth creating a jira issue to track this so that the next time
> >>> someone is looking at the ResourceAdapter code it can be revisited.
> >>>
> >>> Does it occur every time?
> >>>
> >>>
> >>> 2009/7/21 Chinmaya <chinmayaenator@gmail.com>:
> >>>>
> >>>> I have embeded ActiveMQ inside Jboss AS. Modified the ra.xml file to
> > read
> >>>> the
> >>>> embeded broker-config.xml. Please find the attached ra.xml and
> >>>> broker-config.xml.
> >>>> My application is working as expected.
> >>>> But the problem comes when i tries to shutdown it.
> >>>>
> >>>> Any suggestions ?
> >>>>
> >>>> Exceptions :
> >>>> =========
> >>>>
> >>>> 12:53:50,354 INFO  [BrokerService] ActiveMQ Message Broker (localhost,
> >>>> ID:CBehera-3677-1248160613758-0:0) is shutting down
> >>>> 12:53:51,026 INFO  [TransportConnector] Connector openwire Stopped
> >>>> 12:53:51,026 INFO  [TransportConnector] Connector vm://localhost
> >>>> Stopped
> >>>> 12:53:51,026 WARN  [ActiveMQManagedConnection] Connection failed:
> >>>> javax.jms.JMSException: Peer (vm://localhost#0) disposed.
> >>>> 12:53:51,026 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
> >>>> 12:53:51,057 WARN  [JBossManagedConnectionPool] ResourceException
> >>>> cleaning
> >>>> up ManagedConnection:
> >>>>
> >
> org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1ea7051
> > [state=DESTROY
> >>>> mc=org.apache.activemq.ra.ActiveMQManagedConnection@1797bd3 handles=0
> >>>> lastUse=1248160634617 permit=true trackByTx=false
> >>>>
> >
> mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@b08682
> >>>>
> >
> context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@14ef680
> >>>> xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@1195c88
> >>>> 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
> >>>> 12:53:51,135 INFO  [BrokerService] ActiveMQ JMS Message Broker
> >>>> (localhost,
> >>>> ID:CBehera-3677-1248160613758-0:0) stopped
> >>>> 12:53:51,198 INFO  [QuartzScheduler] Scheduler
> >>>> DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
> >>>> 12:53:51,198 INFO  [QuartzScheduler] Scheduler
> >>>> DefaultQuartzScheduler_$_NON_CLUSTERED paused.
> >>>> 12:53:51,213 INFO  [SimpleThreadPool] There are still 27 worker
> threads
> >>>> active. See javadoc runInThread(Runnable) for a possible explanation
> >>>> 12:53:51,213 INFO  [QuartzScheduler] Scheduler
> >>>> DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
> >>>> 12:53:51,635 INFO  [TransactionManagerService] Stopping transaction
> >>>> recovery
> >>>> manager
> >>>> 12:53:51,635 INFO  [TransactionManagerService] Destroying
> >>>> TransactionManagerService
> >>>> 12:53:52,198 INFO  [HypersonicDatabase] Database standalone closed
> >>>> clean
> >>>> 12:54:00,901 INFO  [ServerImpl] Shutdown complete
> >>>> Shutdown complete
> >>>> Halting VM http://www.nabble.com/file/p24585976/broker-config.xml
> >>>> broker-config.xml  http://www.nabble.com/file/p24585976/ra.xml ra.xml
> >>>> --
> >>>> View this message in context:
> >>>>
> >
> http://www.nabble.com/Exception-while-shutting-down-the-embedded-broker-in-Jboss%3A-tp24585976p24585976.html
> >>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> http://blog.garytully.com
> >>>
> >>> Open Source Integration
> >>> http://fusesource.com
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >
> http://www.nabble.com/Exception-while-shutting-down-the-embedded-broker-in-Jboss%3A-tp24585976p24600977.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > http://blog.garytully.com
> >
> > Open Source Integration
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Exception-while-shutting-down-the-embedded-broker-in-Jboss%3A-tp24585976p24605108.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message