【问题标题】:JBOSS - The transaction is not active errorJBOSS - 事务未激活错误
【发布时间】:2013-10-31 11:11:25
【问题描述】:

当我运行 JBOSS 时,出现如下事务超时错误。

SystemException The following problem occured: null; nested exception is:
        java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.a
rjunacore.inactive] The transaction is not active!; - nested throwable: (java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transactio
n.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!): null; nested exception is:

        java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.a
rjunacore.inactive] The transaction is not active!; - nested throwable: (java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transactio
n.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!): [com.arjuna.ats.internal.jt
a.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active! called at com.jco
ffee.base.global.ExceptionMapper.handleException(ExceptionMapper.java:240)

我用谷歌搜索了这个错误,发现了一个解决方案,其中涉及将事务超时从 300 更改为更高的值,我这样做了,

   <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
      name="jboss:service=TransactionManager">
      <attribute name="TransactionTimeout">3000</attribute>
      <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> 
   </mbean>

但错误仍然存​​在。

我的堆大小如下:

-Xms2000m  
-Xmx2000m
-XX:PermSize=256M
-XX:MaxPermSize=256m

在错误发生之前,垃圾收集器会卸载大量的类,而 RAM 只剩下几 MB 的可用空间。我有大约 6GB 的 RAM + 3GB 的页面文件

任何帮助将不胜感激。

提前非常感谢。

【问题讨论】:

  • 它是一个 BeanManagedTransaction?
  • @GabrielAramburu 是的。

标签: jboss transactions heap-size


【解决方案1】:

我已经看到达到事务超时时的异常,我认为增加超时应该可以解决问题。 尝试将事务超时设置为UserTransaction 对象,如显示here。 (使用 BMT 部分)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-13
    • 1970-01-01
    • 1970-01-01
    • 2019-02-19
    • 1970-01-01
    • 2018-06-08
    • 2014-10-04
    相关资源
    最近更新 更多