由于SQLException,无法连接到数据源

时间:2013-10-16 10:39:25

标签: jboss atg

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)

2 个答案:

答案 0 :(得分:5)

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>

ATG 9.3就是这种情况,我认为仍然适用。另一个快速参考原因是here

答案 1 :(得分:0)

我要面对同样的问题。通过修改我的服务器\ ATG Publishing \ conf \ _jbossts-properties.xml文件解决了这个问题。

<properties depends="arjuna" name="jta">
<!--  SNIPPED FOR BREVITY -->
<property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true" />
</properties>

礼貌:http://branchbird.com/blog/the-atg-endeca-integration-part-2-loading-your-mdex/