OptimisticLockException persisting collection containing Lob fields with Oracle
-------------------------------------------------------------------------------

                 Key: OPENJPA-743
                 URL: https://issues.apache.org/jira/browse/OPENJPA-743
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.2.0
         Environment: OpenJPA 1.2.0, Oracle 10g ojdbc14.jar, version 10.2.0.1.0
            Reporter: Jeremy Bauer
            Assignee: Jeremy Bauer


Persisting an object graph with an entity containing a persistent collection of 
objects which contain a Lob field may fail on Oracle if statement batching is 
enabled.  The failure will depend on the order of operations, which can be 
somewhat intermittent.  If more than one insert into the table containing the 
Lob column are batched together and there is a mix of null and non-null data 
value parameters, the batch insert operation will fail with an 
OptimisticLockException.  

A simple (but not especially performance friendly) way to work around the 
problem is to disable statement batching via: 
<property name="openjpa.jdbc.DBDictionary" value="oracle(batchLimit=0)"/>  
Otherwise, if possible, make sure all Lob fields are set to a non-null value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to