<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBoss 7.1.0 Cannot create session factory, server locator is closed
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jboss_sa">jboss_sa</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/728735#728735">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,,</p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">After leaving the server idle for a while we get the below error "<span style="color: #ff0000;">Cannot create session factory, server locator is closed</span>" and we are not be able to connect to the server using JMS Client anymore and the MDB's are not connected to the queue's also?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">I think it's related to server configuration, so I tried to change the server configuration, but no chance! "<span style="font-family: Arial, sans-serif;">standalone.xml file is attached</span>"</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong style="color: #ff0000;">Server Error:</strong></p><p>06:46:31,271 WARN&#160; [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from invm:0. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=3]</p><p>06:46:31,276 WARN&#160; [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Client connection failed, clearing up resources for session 218278b7-7e69-11e1-bc23-180373bdc963</p><p>06:46:31,278 WARN&#160; [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Cleared up resources for session 218278b7-7e69-11e1-bc23-180373bdc963</p><p>06:46:31,277 WARN&#160; [org.hornetq.ra.HornetQRAManagedConnection] (Thread-5866) Handling JMS exception failure: org.hornetq.ra.HornetQRAManagedConnection@1b55b1c: javax.jms.JMSException: HornetQException[errorCode=2 message=Channel disconnected]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.client.HornetQConnection$JMSFailureListener.connectionFailed(HornetQConnection.java:655) [hornetq-jms-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.callFailureListeners(ClientSessionFactoryImpl.java:905) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:690) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:556) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.access$000(ClientSessionFactoryImpl.java:79) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl$1.run(ClientSessionFactoryImpl.java:386) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]</p><p>Caused by: HornetQException[errorCode=2 message=Channel disconnected]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connectionDestroyed(ClientSessionFactoryImpl.java:380) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.remoting.impl.invm.InVMConnector$Listener$1.run(InVMConnector.java:203) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;... 4 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>06:46:31,280 WARN&#160; [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from invm:0. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=3]</p><p>06:46:31,288 WARN&#160; [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] (Thread-228 (HornetQ-client-global-threads-19613333)) Notified of connection failure in xa recovery connectionFactory for provider ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0], discoveryGroupConfiguration=null], connectorConfig=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0, backupConfig=null] will attempt reconnect on next pass: HornetQException[errorCode=2 message=Channel disconnected]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connectionDestroyed(ClientSessionFactoryImpl.java:380) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.remoting.impl.invm.InVMConnector$Listener$1.run(InVMConnector.java:203) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>08:40:00,597 WARN&#160; [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Error trying to connect to any providers for xa recovery</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]</p><p>Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator is closed (maybe it has been garbage collected)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699) [hornetq-core-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321) [hornetq-jms-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.11.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;... 7 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>08:40:58,684 INFO&#160; [org.jboss.as.naming] (Remoting "new2-pc" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 47e1eb49 (inbound) of Remoting connection 01b6872e to /192.168.95.97:16253</p><p>08:41:08,305 ERROR [org.jboss.remoting.remote.connection] (Remoting "new2-pc" read-1) JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host</p><p>08:41:08,310 ERROR [org.jboss.remoting.remote.connection] (Remoting "new2-pc" read-1) JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host</p><p>08:41:08,316 ERROR [org.jboss.remoting.remote.connection] (Remoting "new2-pc" read-1) JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host</p><p>08:41:08,334 ERROR [org.jboss.remoting.remote.connection] (Remoting "new2-pc" read-1) JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;"><strong>JMS Client Exception:</strong></span></p><p>[JMSClient] [put] Exception: Failed to create session factory</p><p>javax.jms.JMSException: Failed to create session factory</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:605)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.my.jms.client.main.JMSClient.put(JMSClient.java:72)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.my.jms.client.main.MainWindows$1.actionPerformed(MainWindows.java:266)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.DefaultButtonModel.setPressed(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Component.processMouseEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.swing.JComponent.processMouseEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Component.processEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Container.processEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Component.dispatchEventImpl(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Container.dispatchEventImpl(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Component.dispatchEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Container.dispatchEventImpl(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Window.dispatchEventImpl(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.Component.dispatchEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue.dispatchEventImpl(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue.access$000(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue$1.run(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue$1.run(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.security.AccessController.doPrivileged(Native Method)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue$2.run(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue$2.run(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.security.AccessController.doPrivileged(Native Method)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventQueue.dispatchEvent(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.pumpEvents(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.pumpEvents(Unknown Source)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.awt.EventDispatchThread.run(Unknown Source)</p><p>Caused by: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:769)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;... 39 more</p><p>07/04/2012 08:41:46 org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1$MessageReceiver handleEnd</p><p>ERROR: Channel end notification received, closing channel Channel ID 94faade1 (outbound) of Remoting connection 00513d61 to /192.168.95.97:4447</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/728735#728735">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>