Error in log. ARJUNA012140: Adding multiple last resources is disallowed

Good day! The log file shows an error: “ARJUNA012140: Adding multiple last resources is disallowed.” There are transaction rollback records, a PostgreSQL database is used (both for Camunda and for applications published on the application server).

What are the typical scenarios for resolving this error?
Thx.

Hi @ascher,

a quick lookup on Google and stackoverflow for the error message brings up a hint to use XA datasources to get rid of the message.

From my exprience with other application servers, I would go that way.

Hope this helps, Ingo

Thank you very much for your comment.
Do I understand correctly that I should change the connection string in standalone.xml and use the xa datasource class?
Is it possible to give an example of a string?

There is information on google that a parameter exists:

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

Can’t be used in camunda?

Thank.

Hi @ascher,

could you please post your current (anonymized) settings here?

In the attachment.
standalone.xml (32.5 KB)

Thanks for the help!
The system parameter helped -

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

and using xa-datasource.

You shouldn’t just blindly apply properties. Looking at the docs for that particular one, you find “This can result in data corruption or heuristic outcomes.”.

Thank you very much for the clarification.
And what is the best way to diagnose possible errors that may arise as a result of using the parameter?
Are there any best practices?

I’d recommend just not using it and figuring out what your base problem is. If you are using an XA-TransactionManager then you should only use XA-DataSources. If you do, there should be no need for this param in the first place.
Get to know the system and decide which is the best option (XA and always, or no XA at all with all the consequences, or a mix which can be dangerous if you don’t understand what you are doing).
I love XA because it takes away a lot of complexity from the code, but adds it in the infrastructure. Tradeoff as all things in IT. :slight_smile: