13 Replies Latest reply on Apr 5, 2013 6:21 PM by Nau Tilus

    jbpm5 Exception:Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]

    cheney-dut Newbie

      Today, i write a demo. i get the following exception when runing.

      Anyone can help?

      Thanks!

       

       

      17895 2011-06-20 22:49:50,151[main] ERROR event.def.AbstractFlushingEventListener.performExecutions - Could not synchronize database state with session

      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]

          at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)

          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)

          at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)

          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)

          at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)

          at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)

          at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)

          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)

          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)

          at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)

          at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:397)

          at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:147)

          at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95)

          at com.sinosig.claim.bpm.factory.ProcessInstanceTest.testNext(ProcessInstanceTest.java:60)

          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 junit.framework.TestCase.runBare(TestCase.java:127)

          at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)

          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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)

          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      17902 2011-06-20 22:49:50,158[main] WARN  bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent - Synchronization.beforeCompletion() call failed for org.hibernate.ejb.AbstractEntityManagerImpl$1@1611aec, marking transaction as rollback only

      javax.persistence.OptimisticLockException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]

          at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:630)

          at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:588)

          at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)

          at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:397)

          at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:147)

          at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95)

          at com.sinosig.claim.bpm.factory.ProcessInstanceTest.testNext(ProcessInstanceTest.java:60)

          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 junit.framework.TestCase.runBare(TestCase.java:127)

          at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)

          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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)

          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]

          at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)

          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)

          at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)

          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)

          at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)

          at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)

          at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)

          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)

          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)

          at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)

          ... 21 more