AnsweredAssumed Answered

Error updating database

Question asked by lokesh_zyme on Jun 16, 2014
Latest reply on Jul 7, 2014 by jbarrez
Hello Activity developers ,

I am using activiti 5.15  with openidm integration . I have create a workflow with some scheduler user task .and which I am completeting manually by using complete task .
in the same work flow I am using another user task that need  user approval . but I am getting following issue .

please help me in that . thanks, in advance . the error details is as follows

======================================================
Error while closing command context

### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential i
ntegrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOR
EIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7')"; SQL stat
ement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionE
ntity.insertExecution-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_,
PROC_DEF_ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PA
RENT_ID_, SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)     values (
?,       1,       ?,       ?,       ?,       ?,       ?,       ?,       ?,
?,       ?,       ?,       ?,       ?     )
### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violat
ion: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) RE
FERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7')"; SQL statement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
-> org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.
java:23)
-> org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession
.java:147)
-> org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession
.java:134)
-> org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:459)
-> org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:369)
-> org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandCont
ext.java:157)
-> org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java
:109)
-> org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(Comman
dContextInterceptor.java:49)
-> org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTra
nsactionInterceptor.java:59)
-> org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.ja
va:33)
-> org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunna
ble.java:46)
-> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:114
5)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:61
5)
-> java.lang.Thread.run(Thread.java:724)
Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_
EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7
')"; SQL statement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
-> org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.
java:23)
-> org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession
.java:147)
-> org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession
.java:134)
-> org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:459)
-> org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:369)
-> org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandCont
ext.java:157)
-> org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java
:109)
-> org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(Comman
dContextInterceptor.java:49)
-> org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTra
nsactionInterceptor.java:59)
-> org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.ja
va:33)
-> org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunna
ble.java:46)
-> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:114
5)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:61
5)
-> java.lang.Thread.run(Thread.java:724)Exception in thread "pool-4-thread-1" or
g.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential i
ntegrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOR
EIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7')"; SQL stat
ement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionE
ntity.insertExecution-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_,
PROC_DEF_ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PA
RENT_ID_, SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)     values (
?,       1,       ?,       ?,       ?,       ?,       ?,       ?,       ?,
?,       ?,       ?,       ?,       ?     )
### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violat
ion: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) RE
FERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7')"; SQL statement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(Exception
Factory.java:23)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSq
lSession.java:147)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSq
lSession.java:134)
        at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.ja
va:459)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:369)

        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(Com
mandContext.java:157)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandCont
ext.java:109)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:49)
        at org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execut
e(JtaTransactionInterceptor.java:59)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:33)
        at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJ
obsRunnable.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violat
ion: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) RE
FERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('7')"; SQL statement:
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_
ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_,
SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_)
    values (
      ?,
      1,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [23506-168]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:169)
        at org.h2.message.DbException.get(DbException.java:146)
        at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintRe
ferential.java:361)
        at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferentia
l.java:303)
        at org.h2.table.Table.fireConstraints(Table.java:871)
        at org.h2.table.Table.fireAfterRow(Table.java:888)
        at org.h2.command.dml.Insert.insertRows(Insert.java:126)
        at org.h2.command.dml.Insert.update(Insert.java:84)
        at org.h2.command.CommandContainer.update(CommandContainer.java:75)
        at org.h2.command.Command.executeUpdate(Command.java:230)
        at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:
194)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(
PreparedStatementHandler.java:41)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(R
outingStatementHandler.java:66)
        at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.jav
a:45)
        at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)

        at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.jav
a:75)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSq
lSession.java:145)
        … 12 more

Outcomes