Why do I receive "org.hibernate.exception.ConstraintViolationException: could not update: [org.jbpm.task.Task#1] " in jBPM5 ?
Issue
- Following the instantiation of a sample JBPM process including human tasks, pending tasks were not visible in the JBPM console's task list as expected. The following ERRORs appeared in the server log on process instantiation.
2012-07-02 10:25:02,754 WARN [org.hibernate.util.JDBCExceptionReporter] (Thread-20) SQL Error: -177, SQLState: 23000
2012-07-02 10:25:02,754 ERROR [org.hibernate.util.JDBCExceptionReporter] (Thread-20) Integrity constraint violation - no parent FK27A9A59E619A0 table: TASK in statement [update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?]
2012-07-02 10:25:02,754 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (Thread-20) Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not update: [org.jbpm.task.Task#1]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2443)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2325)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2625)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
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:1030)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:367)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
at org.jbpm.task.service.persistence.TaskLocalTransactionManager.commit(TaskLocalTransactionManager.java:55)
at org.jbpm.task.service.persistence.TaskPersistenceManager.endTransaction(TaskPersistenceManager.java:94)
at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:999)
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:187)
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:140)
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:44)
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:85)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: Integrity constraint violation - no parent FK27A9A59E619A0 table: TASK in statement [update Task set archived=?, allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAcces\
sType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=?, OPTLOCK=? where id=? and OPTLOCK=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:96)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
... 20 more
Can you please advise me how to resolve this issue?
- I get ConstraintViolationException when a process reaches to a User Task Node which Actors = 'admin'. Don't we have 'admin' by default?
Environment
- JBoss Enterprise Business Rules Management System (BRMS)
- 5.3.x
- jBPM
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
