1 Reply Latest reply: Jun 3, 2011 1:57 AM by Jeff Yu RSS

Ode JOBID - Unique index or primary key violation Error

Federico Ceccarini Newbie

I'm using riftsaw-2.2.0.Final.

 

I have a bpel process when I invoke the process the following error come any idea?

 

The process use the correlation functionality.

 

2011-04-28 09:25:08,256 ERROR [org.apache.ode.scheduler.simple.SimpleScheduler] (ODEServer-8) Error while processing a persisted job: org.apache.ode.dao.jpa.scheduler.JobDAOImpl@1e438f7

org.apache.ode.bpel.iapi.Scheduler$JobProcessorException

    at org.apache.ode.bpel.engine.BpelEngineImpl.acquireInstanceLock(BpelEngineImpl.java:396)

    at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:405)

    at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:450)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable$1.call(SimpleScheduler.java:566)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable$1.call(SimpleScheduler.java:556)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:289)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:246)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.processInTransactionContext(SimpleScheduler.java:556)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:541)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:528)

    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

    at java.util.concurrent.FutureTask.run(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

2011-04-28 09:25:08,288 ERROR [org.apache.ode.scheduler.simple.SimpleScheduler] (ODEServer-8) Error while processing job, retrying in 5s

2011-04-28 09:25:08,295 WARN  [org.hibernate.util.JDBCExceptionReporter] (ODEServer-8) SQL Error: 23001, SQLState: 23001

2011-04-28 09:25:08,297 ERROR [org.hibernate.util.JDBCExceptionReporter] (ODEServer-8) Unique index or primary key violation: "PRIMARY_KEY_C ON PUBLIC.ODE_JOB(JOBID)"; SQL statement:

insert into ODE_JOB (channel, correlationKeySet, correlatorId, detailsExt, inMem, instanceId, mexId, nodeid, processId, retryCount, scheduled, ts, transacted, type, jobid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23001-124]

2011-04-28 09:25:08,304 WARN  [org.hibernate.util.JDBCExceptionReporter] (ODEServer-8) SQL Error: 23001, SQLState: 23001

2011-04-28 09:25:08,305 ERROR [org.hibernate.util.JDBCExceptionReporter] (ODEServer-8) Unique index or primary key violation: "PRIMARY_KEY_C ON PUBLIC.ODE_JOB(JOBID)"; SQL statement:

insert into ODE_JOB (channel, correlationKeySet, correlatorId, detailsExt, inMem, instanceId, mexId, nodeid, processId, retryCount, scheduled, ts, transacted, type, jobid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23001-124]

2011-04-28 09:25:08,313 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (ODEServer-8) Could not synchronize database state with session

org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)

    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)

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

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

    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 com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)

    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)

    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)

    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)

    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)

    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)

    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:298)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:246)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.processInTransactionContext(SimpleScheduler.java:601)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:541)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:528)

    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

    at java.util.concurrent.FutureTask.run(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

Caused by: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PRIMARY_KEY_C ON PUBLIC.ODE_JOB(JOBID)"; SQL statement:

insert into ODE_JOB (channel, correlationKeySet, correlatorId, detailsExt, inMem, instanceId, mexId, nodeid, processId, retryCount, scheduled, ts, transacted, type, jobid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23001-124]

    at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1082)

    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:476)

    at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)

    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

    ... 24 more

2011-04-28 09:25:08,404 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (ODEServer-8) [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@f0bea7

javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

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

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

    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)

    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)

    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)

    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)

    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)

    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)

    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:298)

    at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:246)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.processInTransactionContext(SimpleScheduler.java:601)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:541)

    at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(SimpleScheduler.java:528)

    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

    at java.util.concurrent.FutureTask.run(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)

    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)

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

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

    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)

    ... 17 more

Caused by: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PRIMARY_KEY_C ON PUBLIC.ODE_JOB(JOBID)"; SQL statement:

insert into ODE_JOB (channel, correlationKeySet, correlatorId, detailsExt, inMem, instanceId, mexId, nodeid, processId, retryCount, scheduled, ts, transacted, type, jobid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23001-124]

    at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1082)

    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:476)

    at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)

    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

    ... 24 more