I have a project based in Spring Web model-view-controller (MVC) framework. The version of the Spring Web model-view-controller (MVC) framework is 3.2.8 deployed on a WebLogic Server Version: 12.1.2.0.0
I have this error in 1 query
Caused By: java.lang.RuntimeException: java.sql.SQLException:
The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 31 seconds
BEA1-000D9470C1367F28EDB9]'.
No further JDBC access is allowed within this transaction., criteria [ com.tdk.books.domain.ProductSearchCriteria@c5f15d5c ], sql [ select PRODUCT_ID from V_BOOKS where category_id = ? ]
even I put a timeout of 10000 in the service method
@Transactional(timeout=10000, propagation = Propagation.REQUIRES_NEW)
Usuallly this happens when a transaction is finished, but this fact is ignored and an app tries to continue processing and to issue JDBC statements that happen outside of the TX. The source of this problem could be a Connection object that is passed around through a sequence of methods that use the connection. One of such methods commits the TX thus invalidating the connection.
Resource Link: https://community.oracle.com/thread/734370
Some suggestions are found to solve the issue.
Please try changing your weblogic datasource settings from Non - XA to XA. You should get rid of this exception.
Resource Link: The transaction is no longer active - status: 'Committed'
Uncheck the Supports Global Transactions restart the server.
Resource Link: In PRPC ERROR: The transaction is no longer active - status: 'Committed'
The real solution of this problem is asynchronous processing. But it might be possible that it's not suitable in your case.
First one If you are making any jdbc call to Oracle, then you can set the query time out whn you execute the query on database. And after query timeout, Oracle will give you an exception that you can handle it. So basically in this case you are not cancelling your EJB request actually. But it might solve your problem.
Resource Link: https://coderanch.com/t/68079/transaction-rollback-commit