Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-9343

Uncommitted transaction and connection leaked if the user votes for an issue while they have already voted or unvotes if they have not voted.

    XMLWordPrintable

Details

    Description

      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.)

      Attachments

        Activity

          People

            anton@atlassian.com AntonA
            anton@atlassian.com AntonA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: