cancel
Showing results for 
Search instead for 
Did you mean: 

Parent Key not found error for table ACT_FK_VAR_PROCINST

sakumar1
Champ in-the-making
Champ in-the-making
Below error i am getting while executing workflow

### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (DMS_SP.ACT_FK_VAR_PROCINST) violated - parent key not found

### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.insertVariableInstance-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_RU_VARIABLE (ID_, REV_,     TYPE_, NAME_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_,     DOUBLE_, LONG_ , TEXT_, TEXT2_)     values (     ?,     1,     ?,     ?,     ?,     ?,     ?,     ?,     ?,     ?,     ?,     ?     )
### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (ACT_FK_VAR_PROCINST) violated - parent key not found

After dropping, recreating table this issue got resolved . is this is a bug in Activiti. We are using Activiti 5.17. We don't have async activiti.

Regards,
Sampath
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
The error seems to indicate a variable is being inserted, but the process instance it belongs to has been deleted.
I would need some more information about when this exception occurs (what API you're invoking, etc.)

sakumar1
Champ in-the-making
Champ in-the-making
This is sub process called by Activiti. My question here is how same workflow working after deleting Activiti Schema and recreating it again ?

jbarrez
Star Contributor
Star Contributor
"This is sub process called by Activiti"

That's very little information. Do you have an example?

"My question here is how same workflow working after deleting Activiti Schema and recreating it again ?"

The exception said the process instance was missing. So somehow the instance row in the database was removed while the process variable was not. Without knowing what your code does, it's very hard to say anything how that was caused.