Idle JDBC connection results in "Connection is not associated with a managed connection" error in JBoss EAP
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
Issue
- Leaving our application idle for certain duration (30 minutes), launching the application hangs and never comes up. The log shows the following message:
ERROR (Transaction.java:rollback:193) An attempt was made to rollback a transaction but the database did not allow the operation to be rolled back.
java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@1d6065f
Resolution
- Set the idle timeout to a value greater than 0 in
"*-ds.xml", The idle timeout duration can be set according to the application / environment requirement.
Root Cause
- The idle timeout was set to 0, which causes it to never time out connections
Diagnostic Steps
Check the idle timeout in the "*-ds.xml" file, If it is too large then set it accordingly.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
