Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1333

Oracle driver returns incorrect update count on batched insert

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        techhusky Jeremy Bauer added a comment -

        Docs updated under rev 821077.

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

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

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

        We need to doc this....

        Show
        drwoods Donald Woods added a comment - We need to doc this....
        Hide
        techhusky 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
        techhusky 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.

          People

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

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development