07-05-2011 12:11 PM
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[39844] was updated by another transaction concurrently
org.activiti.engine.ActivitiOptimisticLockingException: ExecutionEntity[6246] was updated by another transaction concurrently
org.activiti.engine.ActivitiException: Cannot find task with id 6432
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
### The error may involve org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceEntity.updateHistoricTaskInstance-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="deploymentResources" value="some.bpmn20.xml" />
<property name="beans">
<map>
<entry key="timeoutTask" value-ref="timeoutTask"/>
</map>
</property>
</bean>
07-05-2011 04:47 PM
this.jdbcTemplate.update(
"DELETE FROM ACT_HI_ACTINST WHERE END_TIME_ < ?", olderDate);
this.jdbcTemplate.update(
"DELETE FROM ACT_HI_PROCINST WHERE END_TIME_ < ?", olderDate);
this.jdbcTemplate.update(
"DELETE FROM ACT_HI_TASKINST WHERE END_TIME_ < ?", olderDate);
07-05-2011 05:28 PM
07-06-2011 11:24 AM
07-06-2011 12:36 PM
06-18-2012 12:27 PM
06-18-2012 01:00 PM
06-18-2012 01:08 PM
does this not happen if you start just 1?
06-19-2012 07:57 AM
does this not happen if you start just 1?
No, it only happens when launching multiple processes concurrently. Specifically, the error occurs in the deleteHistoricProcessInstanceById method.
JdbcTemplate jdbcTemplate = (JdbcTemplate) ApplicationContextProvider
.getInstance().getBean("jdbcTemplate");
jdbcTemplate.update(
"DELETE FROM ACT_HI_ACTINST WHERE PROC_INST_ID_ < ?",
processInstanceId);
jdbcTemplate.update(
"DELETE FROM ACT_HI_PROCINST WHERE PROC_INST_ID_ < ?",
processInstanceId);
jdbcTemplate.update(
"DELETE FROM ACT_HI_TASKINST WHERE PROC_INST_ID_ < ?",
processInstanceId);
06-20-2012 03:19 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.