1 Reply Latest reply on May 19, 2014 7:17 AM by tkarasan

    Lock wait timeout exceeded; try restarting transaction

    tkarasan

      Hi!

        I am using jbpm workflow for my project, but when i tried to implement the Automatic approval process in workflow it shows the error like "Lock wait timeout exceeded; try restarting transaction". If you know the solution for the problem please tell me how to overcome the problem?

        • 1. Re: Lock wait timeout exceeded; try restarting transaction
          tkarasan

          If i used postgresql, its working fine!. Above problem occurs only for MySQL database.!?

           

          console error:

          11:20:08,701 ERROR [http-bio-28080-exec-21][JDBCExceptionReporter:76] Lock wait timeout exceeded; try restarting transaction

          11:20:08,706 ERROR [http-bio-28080-exec-21][JSONWebServiceServiceAction:114] java.lang.reflect.InvocationTargetException

          java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl._invokeActionMethod(JSONWebServiceActionImpl.java:191)

              at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl.invoke(JSONWebServiceActionImpl.java:66)

              at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.getJSON(JSONWebServiceServiceAction.java:104)

              at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:75)

              at com.liferay.portal.servlet.JSONServlet.service(JSONServlet.java:75)

              at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:79)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

              at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.service(PortalClassLoaderServlet.java:99)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)

              at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)

              at $Proxy1156.doFilter(Unknown Source)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)

              at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:70)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)

              at $Proxy1156.doFilter(Unknown Source)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)

              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)

              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)

              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:70)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)

              at $Proxy1156.doFilter(Unknown Source)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)

              at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:70)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)

              at $Proxy1156.doFilter(Unknown Source)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)

              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)

              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)

              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:70)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)

              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)

              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)

              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:619)

          Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)

              at com.test.service.persistence.ApplicationfulldetailsPersistenceImpl.updateImpl(ApplicationfulldetailsPersistenceImpl.java:852)

              at com.test.service.persistence.ApplicationfulldetailsPersistenceImpl.updateImpl(ApplicationfulldetailsPersistenceImpl.java:1)

              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:257)

              at sun.reflect.GeneratedMethodAccessor1099.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)

              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

              at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice.java:52)

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

              at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

              at $Proxy799.update(Unknown Source)

              at com.test.service.base.ApplicationfulldetailsLocalServiceBaseImpl.updateApplicationfulldetails(ApplicationfulldetailsLocalServiceBaseImpl.java:440)

              at com.test.service.base.ApplicationfulldetailsLocalServiceBaseImpl.updateApplicationfulldetails(ApplicationfulldetailsLocalServiceBaseImpl.java:423)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)

              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)

              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:133)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)

              at $Proxy849.updateApplicationfulldetails(Unknown Source)

              at com.test.service.ApplicationfulldetailsLocalServiceUtil.updateApplicationfulldetails(ApplicationfulldetailsLocalServiceUtil.java:235)

              at com.test.service.impl.ApplicationfulldetailsLocalServiceImpl.evaluateApplication(ApplicationfulldetailsLocalServiceImpl.java:401)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)

              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)

              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:133)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)

              at $Proxy849.evaluateApplication(Unknown Source)

              at com.test.service.ApplicationfulldetailsLocalServiceUtil.evaluateApplication(ApplicationfulldetailsLocalServiceUtil.java:464)

              at com.test.service.impl.ApplicationfulldetailsServiceImpl.evaluateApplication(ApplicationfulldetailsServiceImpl.java:41)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)

              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)

              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:133)

              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)

              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)

              at $Proxy850.evaluateApplication(Unknown Source)

              at com.test.service.ApplicationfulldetailsServiceUtil.evaluateApplication(ApplicationfulldetailsServiceUtil.java:71)

              ... 84 more

          Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

              at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)

              at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:122)

              at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.flush(ClassLoaderSession.java:218)

              at com.liferay.portal.service.persistence.BatchSessionImpl.update(BatchSessionImpl.java:95)

              at com.liferay.portal.service.persistence.BatchSessionUtil.update(BatchSessionUtil.java:50)

              at com.test.service.persistence.ApplicationfulldetailsPersistenceImpl.updateImpl(ApplicationfulldetailsPersistenceImpl.java:847)

              ... 169 more

          Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

              at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)

              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)

              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)

              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)

              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)

              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)

              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)

              at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:119)

              ... 173 more

          Caused by: java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction

              at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1257)

              at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:943)

              at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)

              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

              ... 179 more