Hi,
I tested TestEmbeddableSuperclass in openjpa-2.0.2-SNAPSHOT-r422266.
I got Optimistic locking errors on Oracle DB 10g.
I used Oracle JDBC dirver ver. 10.2.0.2 and 10.2.0.5,
but I got Optimistic locking error in both conditions.
Thank you.
This is error log.
testPersistAndFind(org.apache.openjpa.persistence.annotations.TestEmbeddableSuperclass)
Time elapsed: 3.547 sec <<< ERROR!
<openjpa-2.0.2-SNAPSHOT-r422266:1101986 fatal store error>
org.apache.openjpa.persistence.RollbackException: Optimistic locking errors
were detected when flushing to the data store. The following objects may
have been concurrently modified in another transaction:
[org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@67c1a6,
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@b5ad68,
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@19c4091]
at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
at
org.apache.openjpa.persistence.common.utils.AbstractTestCase.endTx(AbstractTestCase.java:278)
at
org.apache.openjpa.persistence.annotations.TestEmbeddableSuperclass.testPersistAndFind(TestEmbeddableSuperclass.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:516)
at junit.framework.TestCase.runBare(TestCase.java:127)
at
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:503)
at
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:479)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:179)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: <openjpa-2.0.2-SNAPSHOT-r422266:1101986 nonfatal store error>
org.apache.openjpa.persistence.OptimisticLockException: Optimistic locking
errors were detected when flushing to the data store. The following objects
may have been concurrently modified in another transaction:
[org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@67c1a6,
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@b5ad68,
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@19c4091]
at
org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2304)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2152)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2050)
at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1968)
at
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1492)
at
org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
... 32 more
Caused by: <openjpa-2.0.2-SNAPSHOT-r422266:1101986 nonfatal store error>
org.apache.openjpa.persistence.OptimisticLockException: An optimistic lock
violation was detected when flushing object instance
"org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@67c1a6"
to the data store. This indicates that the object was concurrently modified
in another transaction.
FailedObject:
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.EmbeddableSuperSub@67c1a6
at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.checkUpdateCount(BatchingPreparedStatementManagerImpl.java:299)
at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:188)
at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
... 39 more
--
View this message in context:
http://openjpa.208410.n2.nabble.com/TestEmbeddableSuperclass-get-Optimistic-locking-error-on-Oracle-tp6394236p6394236.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.