I encounter the error below but only after my application crashes because of an other error. So, I suppose these errors are linked. But the first is very strange :
Caused by: org.jbpm.task.service.PermissionDeniedException: User '[User:'renauds']' was unable to execution operation 'Resume' on task id 7 due to a no 'current status' match at org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:311) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:426) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.local.LocalTaskService.resume(LocalTaskService.java:264) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at com.st.ams.task.management.TaskManager.resumeTask(TaskManager.java:320) [classes:]
After crash, all is fine and the resume process is available and can go until the end. But all other new process crash. I try redeploy the application, restart the server, change isolation level and so on but nothing works. The only solution is to remove all tables and rebuild the database and all processes works again.
This is the stack trace of the error blocking me :
17:02:09,370 INFO [stdout] (http--127.0.0.1-8080-5) Hibernate: 17:02:09,370 INFO [stdout] (http--127.0.0.1-8080-5) insert 17:02:09,371 INFO [stdout] (http--127.0.0.1-8080-5) into 17:02:09,371 INFO [stdout] (http--127.0.0.1-8080-5)
PeopleAssignments_PotOwners 17:02:09,371 INFO [stdout] (http--127.0.0.1-8080-5) (task_id, entity_id) 17:02:09,371 INFO [stdout] (http--127.0.0.1-8080-5) values 17:02:09,372 INFO [stdout] (http--127.0.0.1-8080-5) (?, ?)17:02:09,380 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-5) SQL Error: 1452, SQLState: 23000 17:02:09,380 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-5) Cannot add or update a child row: a foreign key constraint fails (
jbpm_test
.peopleassignments_potowners
, CONSTRAINTFK1EE418D2C122ED2
FOREIGN KEY (entity_id
) REFERENCESorganizationalentity
(id
) ON DELETE NO ACTION ON UPDATE CASCADE) 17:02:09,383 WARN [com.arjuna.ats.arjuna] (http--127.0.0.1-8080-5) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a838a14:-384e4b5d:516820a6:25d, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@14db649: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (
jbpm_test
.peopleassignments_potowners
, CONSTRAINTFK1EE418D2C122ED2
FOREIGN KEY (entity_id
) REFERENCESorganizationalentity
(id
) ON DELETE NO ACTION ON UPDATE CASCADE) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1295) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1481) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.0.1.Final.jar:4.0.1.Final] at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93) at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167) at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:376) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.abortWorkItem(CommandBasedStatefulKnowledgeSession.java:156) [drools-core-5.5.0.Final.jar:5.5.0.Final] at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.handleCompletedTask(GenericHTWorkItemHandler.java:276) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.execute(GenericHTWorkItemHandler.java:234) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:329) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.event.MessagingTaskEventListener.triggerPayload(MessagingTaskEventListener.java:76) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.event.MessagingTaskEventListener.handleEvent(MessagingTaskEventListener.java:92) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:109) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:49) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:569) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:495) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:83) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.local.LocalTaskService.completeWithResults(LocalTaskService.java:91) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at com.st.ams.task.management.TaskManager.completeTask(TaskManager.java:295) [classes:]
Is it possible that jbpm lock a table outside a transaction??