AnsweredAssumed Answered

Error updating database Table ACT_RU_VARIABLE.  Cause: org.hibernate.exception.LockTimeoutException:

Question asked by vipulsharma on Aug 20, 2014
Latest reply on Sep 1, 2014 by trademak
Hi All,

I am new to activity and using activity in my application.
I got Below error from Activity while Activity is trying to insert in to ACT_RU_VARIABLE, please help me figure out the reason for this exception. why I am getting this error. below is the error logs in my application log:

Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: org.hibernate.exception.LockTimeoutException: Lock wait timeout exceeded; try restarting transaction
### 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: org.hibernate.exception.LockTimeoutException: Lock wait timeout exceeded; try restarting transaction
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) ~[mybatis-3.1.1.jar:3.1.1]
   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147) ~[mybatis-3.1.1.jar:3.1.1]
   at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:134) ~[mybatis-3.1.1.jar:3.1.1]
   at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:632) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:459) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:167) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:114) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:69) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42) ~[activiti-spring-5.11.jar:na]
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) ~[spring-tx-3.2.3.RELEASE.jar:3.2.3.RELEASE]
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40) ~[activiti-spring-5.11.jar:na]
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) ~[activiti-engine-5.11.jar:5.11]
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:59) ~[activiti-engine-5.11.jar:5.11]

Outcomes