user2879266
user2879266

Reputation: 59

Unable to connect to data source because of SQLException

In ATG 10.2 facing some problem while running Motorprise application on JBOSS and using 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)

Upvotes: 5

Views: 4875

Answers (3)

In my case it was ejb transaction from ejb transaction, but they were leading by ejb container. I can't change allowMultipleLastResources, therefore I've tuned second ejb transaction by me directly. And it solved the problem.

So second ejb in ejb-jar.xml set Bean.

Upvotes: 0

Sandeep
Sandeep

Reputation: 1

Me to face the same problem. Resolved it by modifing my server\ATGPublishing\conf\jbossts-properties.xml file.

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

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

Upvotes: 0

radimpe
radimpe

Reputation: 3215

JBoss by default assumes XA drivers and does not support calling multiple non-XA resources within the same transaction. To enable multiple non-XA resources in JBoss, add the property com.arjuna.ats.jta.allowMultipleLastResources to the jbossjta-properties.xml file, under the <property depends="arjuna" name="jta"> tag:

<property depends="arjuna" name="jta">
  <property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true"/>

You may still see warnings in your log file, but ATG applications will run correctly. To suppress these warnings, add the following to your jboss-log4j.xml file:

<category name="com.arjuna.atg.jta.logging">
  <priority value="ERROR"/>
</category>

This was the case in ATG 9.3 and I assume still holds true. Another quick reference to the cause is here

Upvotes: 5

Related Questions