Commons Dbcp
  1. Commons Dbcp
  2. DBCP-372

Statement Leak occurs when batch update is used.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3, 1.4
    • Fix Version/s: 1.5.1, 2.0
    • Labels:
      None
    • Environment:

      Oracle 11g

      Description

      org.apache.commons.dbcp.PoolablePreparedStatement#passivate()
      execute clearBatch().
      (DBCP-264)

      But this clearBatch() throw SQLException.
      (DelegatingStatement#checkOpen() throw SQLException, because _closed is true.)

      The result,
      the PoolablePreparedStatement doesn't return to pool, and
      the PoolablePreparedStatement doesn't execute PreparedStatement#close().

      When a lot of data is processed,
      in the case of Oracle

      • ORA-00604
      • ORA-01000

      occurs.

      Proposal:
      "clearBatch();" in passivate() method
      changes as follows.

      batchAdded = false;
      getInnermostDelegate().clearBatch();

        Issue Links

          Activity

          Phil Steitz made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Link This issue is duplicated by DBCP-397 [ DBCP-397 ]
          Mark Thomas made changes -
          Link This issue is duplicated by DBCP-407 [ DBCP-407 ]
          Mark Thomas made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.5.1 [ 12325670 ]
          Fix Version/s 2.0 [ 12313721 ]
          Fix Version/s 1.4.1 [ 12314493 ]
          Resolution Fixed [ 1 ]
          Phil Steitz made changes -
          Link This issue blocks DBCP-397 [ DBCP-397 ]
          Phil Steitz made changes -
          Field Original Value New Value
          Fix Version/s 1.4.1 [ 12314493 ]
          Naozumi Taromaru created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Naozumi Taromaru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development