ARJUNA017003

15 views
Skip to first unread message

Vytautas Kalinauskas

unread,
Jul 8, 2021, 4:26:11 AM7/8/21
to narayana-users
I have been struggling with configuring Narayana. This time on every db call whether it is save to db or getting an object I am getting this exception even though I have not done any changes in my code. Could you please help me out to identify this problem?

Caused by: java.sql.SQLException: ARJUNA017003: Checking transaction and found that this connection is already associated with a different transaction! Obtain a new connection for this transaction.

Ondra Chaloupka

unread,
Jul 8, 2021, 7:38:51 AM7/8/21
to narayana-users
Hello,

do I understand right that you run on Spring Boot (https://groups.google.com/g/narayana-users/c/b6UDn8XK07g) and you've applied the configuration of the Narayana started from Snowdrop library?


This error comes from the JDBC driver inside of the Narayana. Narayana recommends not to use the JDBC driver (https://jbossts.blogspot.com/2017/12/narayana-jdbc-transactional-driver.html) for systems of a higher load. The connection pooling should be configured rather with some pooling library like Agroal (https://github.com/agroal/agroal) - a library that Narayana is integrated with but for Spring Boot there could be something more (I'm not so familiar with Spring Boot ecosystem). When you switch the pooling library I assume that could help.

Anyway, the exception predicts that the application uses multiple connections to database and the same connection is used by different transactions. The JDBC requires one connection per transaction (basically per thread ). As we can see the exception in your case the connection has to be reused by different transaction somewhere, maybe not closed while reused, the JDBC driver does not reset transaction association or there is some misconfiguration. I'm not sure here.

It would be great if you can provide us some reproducer and we could investigate on the issue.

Ondra
Reply all
Reply to author
Forward
0 new messages