OpenJPA
  1. OpenJPA
  2. OPENJPA-1333

Oracle driver returns incorrect update count on batched insert

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M3
    • Fix Version/s: 2.0.0-M3
    • Component/s: jdbc
    • Labels:
      None
    • Environment:
      Oracle 10g Server. Oracle 10.2.0.4 JDBC driver.

      Description

      The org.apache.openjpa.persistence.kernel.TestProxies2 jUnit test fails with an OptimisticLockException when using the 10.2.0.4 Oracle JDBC driver. The source of the failure is that one of the batched insert operations is returning an update count that is less than expected. There is are no SQL exception or SQL warnings.

        Activity

        Hide
        Jeremy Bauer added a comment -

        This problem can be corrected by:

        • Disabling statement batching by setting the batchLimit to zero. This has performance implications but produces the correct behavior on the version 10 JDBC driver. Statement batching can be disabled by setting the following persistence property:

        <property name="openjpa.jdbc.DBDictionary" value="batchLimit=0"/>

        or

        • Using version 11.2.0.1 of the Oracle JDBC driver. The issue is corrected in this level of JDBC driver.
        Show
        Jeremy Bauer added a comment - This problem can be corrected by: Disabling statement batching by setting the batchLimit to zero. This has performance implications but produces the correct behavior on the version 10 JDBC driver. Statement batching can be disabled by setting the following persistence property: <property name="openjpa.jdbc.DBDictionary" value="batchLimit=0"/> or Using version 11.2.0.1 of the Oracle JDBC driver. The issue is corrected in this level of JDBC driver.
        Hide
        Donald Woods added a comment -

        We need to doc this....

        Show
        Donald Woods added a comment - We need to doc this....
        Hide
        Jeremy Bauer added a comment -

        Agree. I'll update the Oracle section of the docs.

        Show
        Jeremy Bauer added a comment - Agree. I'll update the Oracle section of the docs.
        Hide
        Jeremy Bauer added a comment -

        Docs updated under rev 821077.

        Show
        Jeremy Bauer added a comment - Docs updated under rev 821077.

          People

          • Assignee:
            Jeremy Bauer
            Reporter:
            Jeremy Bauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development