Chammu
Chammu

Reputation: 113

Wildfly 11 : Adding multiple last resources is disallowed. Trying to add LastResourceRecord

I am facing the below issue in cloud environment while opening any messages in GUI. But the same works fine in my local environment.

Database: Azure SQL server App Server: Wildfly 11

ERROR: "STATUS_MARKED_ROLLBACK - could not prepared statement"

[com.arjuna.ats.arjuna] (default task-16) ARJUNA012140: **Adding multiple last resources is disallowed. Trying to add LastResourceRecord**(XAOnePhaseResource(LocalXAResourceImpl@4ef4285a[connectionListener=5737baa
6 connectionManager=71d95908 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0af40057:-6bf97584:610804c2:652, node_name=1, branch_uid=0:ffff0af40057:-6bf97584:610804c2:669, subordinatenodename=nu
ll, eis_name=java:/jdbc/xxx/xxx/xxx/datasourceUncommitted > productName=Microsoft SQL Server productVersion=12.00.2195 jndiName=java:/jdbc/xxx/xxx/xxx/datasourceUncommitted])), but already have LastResourceRecord(XAOnePhaseResour
ce(LocalXAResourceImpl@9b90875[connectionListener=669bdd38 connectionManager=7991953a warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0af40057:-6bf97584:610804c2:652, node_name=1, branch_uid=0:ff
ff0af40057:-6bf97584:610804c2:666, subordinatenodename=null, eis_name=java:/jdbc/xxx/xxx/xxx/datasource > productName=Microsoft SQL Server productVersion=12.00.2195 jndiName=java:/jdbc/xxx/xxx/xxx/datasource]))

Please help me in resolving this issue.

Upvotes: -1

Views: 237

Answers (1)

Abhishek Khandave
Abhishek Khandave

Reputation: 3230

You need to set allowMultipleLastResources property to true as shown below:

<bean name="CoreEnvironmentBean" class="com.arjuna.ats.arjuna.common.CoreEnvironmentBean">
...
   <property name="allowMultipleLastResources">true</property>
...
</bean>

Else try below code:

<system-properties>
<property name = "com.arjuna.ats.arjuna.allowMultipleLastResources" value = "true" />
</system-properties>

Reference link - https://developer.jboss.org/thread/160950

Upvotes: 0

Related Questions