在 ATG 10.2
中,在 JBOSS 上运行 Motorprise 应用程序并使用 MySQLServer 时遇到一些问题。
Unable to connect to data source because of SQLException: Could not enlist in transaction on entering meta-aware object!;
CONTAINER:atg.repository.RepositoryException; SOURCE:org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a618a4b:d503:525e
689c:1db status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicActi
on: a618a4b:d503:525e689c:1db status: ActionStatus.ABORT_ONLY >))
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:8347)
最佳答案
默认情况下,JBoss 采用 XA 驱动程序,并且不支持在同一事务中调用多个非 XA 资源。要在 JBoss 中启用多个非 XA 资源,请将属性 com.arjuna.ats.jta.allowMultipleLastResources 添加到 jbossjta-properties.xml
文件,位于 <property depends="arjuna" name="jta">
下标签:
<property depends="arjuna" name="jta">
<property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true"/>
您可能仍会在日志文件中看到警告,但 ATG 应用程序将正常运行。要抑制这些警告,请将以下内容添加到 jboss-log4j.xml 文件中:
<category name="com.arjuna.atg.jta.logging">
<priority value="ERROR"/>
</category>
关于jboss - 由于 SQLException,无法连接到数据源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19401281/