Avoiding “Could not enlist in transaction” Errors in JBoss

Problem

Process stalls and throws the following error (LiveCycle hosted on JBoss):

javax.ejb.TransactionRolledbackLocalException: 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: a010f17:c1e:4db79191:23c4fa 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, BasicAction: a010f17:c1e:4db79191:23c4fa status: ActionStatus.ABORT_ONLY >))

Explanation

Within the same process, 2 calls were being made to different non-XA data sources. This is not supported by default on JBoss. Hence the error is thrown.

Solution

To enable calling more than 1 non-XA data source within the same transaction (process), additional configuration is required -

1. Locate the jbossjta-properties.xml file in the [appserver root]/server/all/conf/ directory and open the file in an editor.
2. Locate and modify the ‘properties’ element as follows. Add the property (shown in bold) if it doesn’t already exist in the jbossjta-properties.xml file.
<properties depends=”arjuna” name=”jta”>
<property name=”com.arjuna.ats.jta.allowMultipleLastResources” value=”true”/>
<!– … other properties … –>
</properties>
3. Save and close the file.
————-

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 8.9/10 (19 votes cast)
Avoiding "Could not enlist in transaction" Errors in JBoss, 8.9 out of 10 based on 19 ratings

About Ameeth Palla

Ameeth Palla is a Technical Account Manager for the Adobe Digital Enterprise Platform team. Previously he was in the role of a Technical Expert for LiveCycle for the the Technical Response Team (what is now the Sr.Support Architect role). In both roles, Ameeth handled several technical issues for various customers and worked closely to aid with Sales POC's, Development/Implementation and Manitenance of LiveCycle/ADEP Projects. In the current role he handles several high profile customer accounts and provides guidance in all aspects of LiveCycle/ADEP. Also he is a Certified LiveCycle ES2.5 Process Management Expert. He was nominated for the 'Adobe Founders Award' and the 'Excellence Matters' award for LiveCycle/ADEP BU.
This entry was posted in ADEP, Adobe LiveCycle ES, Adobe LiveCycle ES2 (9.0.x), Document Services, General Interest and tagged , , . Bookmark the permalink.

2 Responses to Avoiding “Could not enlist in transaction” Errors in JBoss

  1. Nice Jboss Tweak ! :-)

  2. aka says:

    it really works, thanks