2 Replies Latest reply on Sep 6, 2005 9:13 AM by James Depoorter

    Delete process method

    Alejandro Guizar Master

      I exercised that method and hit an integrity constraint violation:

      Integrity constraint violation FK_LOG_PARENT table: JBPM_LOG in statement [delete from JBPM_LOG where TOKEN_ in (?)]

      Definitely, there is a problem here. Please open a JIRA issue and provide the stack trace and environment info:
      http://jira.jboss.org/jira/browse/JBPM

        • 1. Re: Delete process method
          nie feng Newbie

          i have run into the same error,
          when use GraphSession:
          ***********************************

          Hibernate: delete from JBPM_LOG where TOKEN_ in (?)

          20:40:26,718 WARN JDBCExceptionReporter : SQL Error: 1217, SQLState: 23000

          20:40:26,718 ERROR JDBCExceptionReporter : Cannot delete or update a parent row: a foreign key constraint fails

          20:40:26,718 ERROR GraphSession : org.hibernate.exception.ConstraintViolationException: could not execute update query

          java.lang.RuntimeException: couldn't delete process instance '1'

          at org.jbpm.db.GraphSession.deleteProcessInstance(GraphSession.java:315)

          at org.jbpm.db.GraphSession.deleteProcessInstance(GraphSession.java:286)

          at jpmptest.JbpmServiceFactory.deleteProcessInstance(JbpmServiceFactory.java:80)

          at jpmptest.jbpmTestMain.(jbpmTestMain.java:109)

          at jpmptest.jbpmTestMain.main(jbpmTestMain.java:127)

          Caused by: org.hibernate.exception.ConstraintViolationException: could not execute update query

          at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74)

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

          at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:99)

          at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:297)

          at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:871)

          at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)

          at org.jbpm.db.GraphSession.deleteProcessInstance(GraphSession.java:307)

          ... 4 more

          Caused by: java.sql.SQLException: Cannot delete or update a parent row: a foreign key constraint fails

          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)

          at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)

          at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1347)

          at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:958)

          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1957)

          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1880)

          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)

          at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:76)

          ... 8 more
          ***********************************
          please help me
          thans in advance

          • 2. Re: Delete process method
            James Depoorter Novice

            according to the release notes, this should be fixed in 3.0.1