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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2014 04:04 AM
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]
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]
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2014 01:18 AM
Hi,
Do you have any jUnit test with process definition to reproduce this error?
Regards
Martin
Do you have any jUnit test with process definition to reproduce this error?
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2014 03:21 AM
Hi,
sorry for late reply. We got this error very occasionally(only once in the logs), and we are not able to re-produce it. Assuming this might be issue with activity version,
currently we are using Activity version 5.11.
Regards,
Vipul Sharma
sorry for late reply. We got this error very occasionally(only once in the logs), and we are not able to re-produce it. Assuming this might be issue with activity version,
currently we are using Activity version 5.11.
Regards,
Vipul Sharma

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2014 03:35 AM
The error message indicates that you are using Hibernate, which we don't use in Activiti. So the error might also be related to the custom logic you added.
Best regards,
Best regards,
