duplicate key row in object 'ACT_RE_PROCDEF'

cancel
Showing results for 
Search instead for 
Did you mean: 
sandy13
Member II

duplicate key row in object 'ACT_RE_PROCDEF'

I am using activiti 5.21.0 with spring 3.1.4. I am getting occasionally that a dupe rows with same version for a process def exists in ACT_RE_PROCDEF table causing the application to not load at all.

Below error shows when it fail to start,

Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: Attempt to insert duplicate key row in object 'ACT_RE_PROCDEF' with unique index 'ACT_UNIQ_PROCDEF'


I have only one process to deploy and the issue is that even though the bpmn file did not change and you just restart the server - a new row with higher version gets inserted all the time.

How to control when a new proc def gets inserted - i.e., insert if the only new version for proc def is available instead of every bootup?

How bpmn detects if anything changed from the bpmn since it was last deployed?

Is this a known issue with acitivity?

1 Reply
abbask01
Senior Member

Re: duplicate key row in object 'ACT_RE_PROCDEF'

actually, activiti itself should version the process def - https://www.activiti.org/5.x/userguide/#versioningOfProcessDefinitions

how are you deploying your process?

Regards,
Abbas