0 Replies Latest reply on Feb 17, 2009 11:44 AM by Elhanan Maayan

    getting deadlock errors when trying to delee

    Elhanan Maayan Novice

      hi...
      when attempting to kill a 2 different processes in parallal (by different web requests) we are getting deadlocks for the query selectLogsForTokens


      anyone can tell us why?
      org.jbpm.persistence.JbpmPersistenceException: hibernate commit failed

      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:216)

      at org.jbpm.svc.Services.close(Services.java:222)

      at org.jbpm.JbpmContext.close(JbpmContext.java:139)

      at org.jbpm.command.impl.CommandServiceImpl.execute(CommandServiceImpl.java:75)

      at com.pnx.pmp.workflow.backend.WorkflowFacade.killWorkflowInst(WorkflowFacade.java:1557)

      at com.pnx.pmp.workflow.backend.WorkflowFacade.killWorkflowInstance(WorkflowFacade.java:1525)

      at com.pnx.underwrite.command.services.UnderwriteRequestServiceCommand.createBriefIndexForWorkflow(UnderwriteRequestServiceCommand.java:106)

      at com.pnx.underwrite.command.services.UnderwriteRequestServiceCommand.processZira(UnderwriteRequestServiceCommand.java:66)

      at com.pnx.underwrite.command.services.UnderwriteRequestServiceCommand.processSimulation(UnderwriteRequestServiceCommand.java:80)

      at com.pnx.underwrite.command.services.AbstractUnderwriteProcessServiceCommand.performService(AbstractUnderwriteProcessServiceCommand.java:122)

      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:585)

      at com.pnx.pmp.flow.micro.backend.AbstractCommandInvoker$SubCommandTransactionalOperation.run(AbstractCommandInvoker.java:181)

      at com.pnx.pmp.orm.backend.TransactionalOperation.doInTransaction(TransactionalOperation.java:28)

      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114)

      at com.pnx.pmp.flow.micro.backend.AbstractCommandInvoker.executeSubCommand(AbstractCommandInvoker.java:90)

      at com.pnx.pmp.flow.micro.backend.Microflow.executeActivity(Microflow.java:309)

      at com.pnx.pmp.flow.micro.backend.state.ExecuteActivityMicroflowState.executeActivity(ExecuteActivityMicroflowState.java:67)

      at com.pnx.pmp.flow.micro.backend.state.ExecuteActivityMicroflowState.handle(ExecuteActivityMicroflowState.java:30)

      at com.pnx.pmp.flow.micro.backend.MicroflowServiceSessionBean.execute(MicroflowServiceSessionBean.java:93)

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

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

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

      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)

      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)

      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)

      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)

      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)

      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

      at org.jboss.ejb.Container.invoke(Container.java:723)

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

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

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

      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)

      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)

      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)

      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)

      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)

      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)

      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)

      at $Proxy82.execute(Unknown Source)

      at com.pnx.pmp.legacy.webapp.MicroflowServiceImpl.invokeMicroflow(MicroflowServiceImpl.java:42)

      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:585)

      at electric.util.reflect.Invocation.execute(Unknown Source)

      at electric.util.reflect.Invocation.invoke(Unknown Source)

      at electric.service.object.ObjectService.invoke(Unknown Source)

      at electric.soap.local.handlers.service.SOAPToServiceHandler.invoke(Unknown Source)

      at electric.soap.local.handlers.service.SOAPToServiceHandler.handle(Unknown Source)

      at electric.soap.security.handlers.SecurityHandler.handle(Unknown Source)

      at electric.soap.handlers.interceptor.SOAPInterceptorHandler.handle(Unknown Source)

      at electric.soap.routing.RoutingHandler.handle(Unknown Source)

      at electric.soap.handlers.logging.SOAPLoggingHandler.handle(Unknown Source)

      at electric.soap.handlers.setup.SetupHandler.handle(Unknown Source)

      at electric.soap.http.handler.HTTPToSOAP.service(Unknown Source)

      at electric.server.http.ServletServer.service(Unknown Source)

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

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

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

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

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

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

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

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

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

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

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

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

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

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

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

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

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

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

      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)

      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)

      at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2437)

      at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2647)

      at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)

      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)

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

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

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

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

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

      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)

      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)

      at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:253)

      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:211)

      ... 97 more

      Caused by: java.sql.BatchUpdateException: ORA-00060: deadlock detected while waiting for resource



      at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:459)

      at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:4210)

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

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

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

      ... 112 more

      12:17:03,726 ERROR [UnderwriteRequestServiceCommand] Caught System Exception for policy 123458. message is com.pnx.pmp.common.exceptions.SystemException: org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: hibernate commit failed}