本地XARecoveryModule.xaRecovery得到了XA异常

时间:2013-01-24 21:06:03

标签: java jboss jms jboss7.x hornetq

有关可能导致此异常的原因的任何想法:

03:54:34,497 WARN  [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
    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.13.Final.jar:]
    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.13.Final.jar:]
    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]
    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]
    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]
    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]
    at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]
    at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]
Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator is closed (maybe it has been garbage collected)
    at org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823) [hornetq-core-2.2.13.Final.jar:]
    at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699) [hornetq-core-2.2.13.Final.jar:]
    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321) [hornetq-jms-2.2.13.Final.jar:]
    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.13.Final.jar:]
    ... 7 more

3 个答案:

答案 0 :(得分:3)

我也遇到了同样的问题。除了Claudiu发布的链接外,this链接也很有帮助。

根据用户的建议,停止AS7,清除jbossas-7/jbossas-7/standalone数据 tmp 目录,然后重新启动AS7解决了我的问题。

在这里发帖可能有助于某人。

答案 1 :(得分:2)

您可以查看JBoss community

中的以下帖子

答案 2 :(得分:1)

使用SYS用户在SQL控制台中执行这些命令,它对我来说是完美的工作:

  GRANT SELECT ON sys.dba_pending_transactions TO <user>;
  GRANT SELECT ON sys.pending_trans$ TO <user>;
  GRANT SELECT ON sys.dba_2pc_pending TO <user>;
  GRANT EXECUTE ON sys.dbms_xa TO <user>;
  GRANT FORCE ANY TRANSACTION TO <user>;

使用用户jboss来更改<user>以连接到数据库