java.sql.SQLException: No operations allowed after connection closed.

Atlassian JIRA | Anton Mazkovoi [Atlassian] | 1 decade ago
  1. 0

    While the JIRA UI does not allow a user to vote for an issue if they have already voted, the user can double lick the 'vote' link. The second request will leave a uncommitted transaction and will leak a db connection. The connection will be left in a thread local however. The same occurs if a user double clicks the unvote link. Databases usually time out unused connections, so the leaked connection will be closed by the database server and the following will appear in JIRA's log files. For MySQL: 2006-01-27 13:19:25,174 WARN [core.entity.jdbc.SQLProcessor] [SQLProcessor.rollback]: SQL Exception while rolling back insert. Error was:java.sql.SQLException: No operations allowed after connection closed. 2006-01-27 13:19:25,175 WARN [NoModule] org.ofbiz.core.entity.jdbc.SQLProcessor java.sql.SQLException: No operations allowed after connection closed. at com.mysql.jdbc.Connection.checkClosed(Connection.java:1842) at com.mysql.jdbc.Connection.rollback(Connection.java:4724) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:265) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:288) at org.ofbiz.core.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:131) at org.ofbiz.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:114) at org.ofbiz.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:153) at org.ofbiz.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:702) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) For PostgreSQL: 2006-02-02 17:47:35.486142500 org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, issueid, AUTHOR, actiontype, actionlevel, actionbody, CREATED, actionnum FROM jiraaction WHERE issueid=? AND actiontype=? (can't create statement from closed connection.)

    Atlassian JIRA | 1 decade ago | Anton Mazkovoi [Atlassian]
    java.sql.SQLException: No operations allowed after connection closed.
  2. 0

    While the JIRA UI does not allow a user to vote for an issue if they have already voted, the user can double lick the 'vote' link. The second request will leave a uncommitted transaction and will leak a db connection. The connection will be left in a thread local however. The same occurs if a user double clicks the unvote link. Databases usually time out unused connections, so the leaked connection will be closed by the database server and the following will appear in JIRA's log files. For MySQL: 2006-01-27 13:19:25,174 WARN [core.entity.jdbc.SQLProcessor] [SQLProcessor.rollback]: SQL Exception while rolling back insert. Error was:java.sql.SQLException: No operations allowed after connection closed. 2006-01-27 13:19:25,175 WARN [NoModule] org.ofbiz.core.entity.jdbc.SQLProcessor java.sql.SQLException: No operations allowed after connection closed. at com.mysql.jdbc.Connection.checkClosed(Connection.java:1842) at com.mysql.jdbc.Connection.rollback(Connection.java:4724) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:265) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:288) at org.ofbiz.core.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:131) at org.ofbiz.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:114) at org.ofbiz.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:153) at org.ofbiz.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:702) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) For PostgreSQL: 2006-02-02 17:47:35.486142500 org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, issueid, AUTHOR, actiontype, actionlevel, actionbody, CREATED, actionnum FROM jiraaction WHERE issueid=? AND actiontype=? (can't create statement from closed connection.)

    Atlassian JIRA | 1 decade ago | Anton Mazkovoi [Atlassian]
    java.sql.SQLException: No operations allowed after connection closed.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [JRA-7972] Workflow migrations hang - Atlassian JIRA

    atlassian.com | 12 months ago
    java.sql.SQLException: No operations allowed after connection closed.
  5. 0

    [JRA-7972] Workflow migrations hang - Atlassian JIRA

    atlassian.com | 12 months ago
    java.sql.SQLException: No operations allowed after connection closed.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      No operations allowed after connection closed.

      at com.mysql.jdbc.Connection.checkClosed()
    2. MySQL jdbc
      Connection.rollback
      1. com.mysql.jdbc.Connection.checkClosed(Connection.java:1842)
      2. com.mysql.jdbc.Connection.rollback(Connection.java:4724)
      2 frames
    3. org.apache.tomcat
      PoolingDataSource$PoolGuardConnectionWrapper.rollback
      1. org.apache.tomcat.dbcp.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:265)
      2. org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:288)
      2 frames
    4. org.ofbiz.core
      SQLProcessor.finalize
      1. org.ofbiz.core.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:131)
      2. org.ofbiz.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:114)
      3. org.ofbiz.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:153)
      4. org.ofbiz.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:702)
      4 frames
    5. Java RT
      Finalizer$FinalizerThread.run
      1. java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
      2. java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
      3. java.lang.ref.Finalizer.access$100(Finalizer.java:14)
      4. java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
      4 frames