This content has been marked as final.
Show 6 replies
-
1. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
rams.rapol Jul 22, 2009 6:47 PM (in response to ronanker)Can you post the error? is it parent key not found?
-
2. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
kukeltje Jul 22, 2009 8:58 PM (in response to ronanker)no jira issues related to foreign key constraint violations? Hmmmm...
-
3. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
ronanker Jul 23, 2009 3:46 AM (in response to ronanker)Here is the stacktrace:
INFO [DefaultCommandService] - exception while executing command org.jbpm.pvm.internal.cmd.DeleteProcessInstance@169c398 org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl#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.delete(AbstractEntityPersister.java:2559) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2715) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97) 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:172) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1142) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835) at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findProcessInstanceByIdIgnoreSuspended(DbSessionImpl.java:208) at org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessInstance(DbSessionImpl.java:248) at org.jbpm.pvm.internal.cmd.DeleteProcessInstance.execute(DeleteProcessInstance.java:49) at org.jbpm.pvm.internal.cmd.DeleteProcessInstance.execute(DeleteProcessInstance.java:31) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.deleteProcessInstanceCascade(ExecutionServiceImpl.java:124) at com.vc.mm.jbpm.JbpmTest.testJBPM(JbpmTest.java:107) .... Caused by: java.sql.SQLException: L'instruction DELETE est en conflit avec la contrainte REFERENCE 'FK_HACTI_HPROCI'. Le conflit s'est produit dans la base de données 'JBPM_TEST', table 'dbo.JBPM4_HIST_ACTINST', column 'HPROCI_'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) ...
I also found the following thread in this forum:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242638#4242638
But the given fix does not seem to be applied in the 4.0.0 GA. -
4. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
kukeltje Jul 23, 2009 5:23 AM (in response to ronanker)but have you tried the 'fix'?
-
5. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
ronanker Jul 23, 2009 12:51 PM (in response to ronanker)I tried but without success.
I set the following codecascade = "all-delete-orphan"
on-delete="cascade"
inverse="true"
on the "historyActivityInstances" set definition in the hbm.xml file in my jbpm.jar but it did not work. I don't undestand why.
On the other side, I also don't understand how it can work with the actual code (but I'm not a jBPM expert and there is perhaps something I missed).
Thanks for any clue. -
6. Re: [JBPM4] deleteProcessInstanceCascade throw an exception
kukeltje Jul 23, 2009 1:09 PM (in response to ronanker)Maybe try a different version of the driver or a different dialect in hibernate