<!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;">
    JMS messages not delivered anymore after warnings during XA recovery
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/greendale">Wilhelm Berger</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/825738#825738">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 all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have migrated an application from AS 5 to AS 7 (<strong>jboss-as-7.1.1.Final</strong>) in <strong>standalone-full mode</strong>. Everything works quite fine, but when the server is running for 1 or 2 days, I get periodic JMS exceptions:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">00:06:14,173 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</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator is closed (maybe it has been garbage collected)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823) [hornetq-core-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699) [hornetq-core-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321) [hornetq-jms-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.13.Final.jar:]</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; ... 7 more</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Whenever these exceptions occur the JMS messages are not delivered anymore to the JMS consumer. Only after a server restart the messages are delivered. My queue declaration in standalone-full.xml is</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;jms-destinations&gt;</p><p>&#160;&#160;&#160; &lt;jms-queue name="MyQueue"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry name="queue/MyQueue"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry name="java:jboss/exported/jms/queue/MyQueue"/&gt;</p><p>&#160;&#160;&#160; &lt;/jms-queue&gt;</p><p>&lt;/jms-destinations&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have found some related posts to this topic but none of them really applied.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any idieas?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>thx and best regards</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/825738#825738">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>