Details

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

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.

Jeremy Bauer
added a comment - 01/Oct/09 16:13 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.