3 Replies Latest reply on Jun 20, 2008 8:12 AM by David Roberts

    Impossible to run anymore a jBPM query after a socket error

    Vincent Sevel Newbie

      Hello,

      I developped a web application with jBPM which works fine most of the time.
      My web application is deployed into Tomcat 6.
      Sometimes after a week-end, my web application cannot query anymore jBPM. The problem persists when I use a new session.
      The only way to solve the problem is to restart my web application context in Tomcat.

      I do not keep any jBPM objects. For each request, I create a new context.
      I do not know if there is a way to force jBPM to give me a clean new instance of jbpmConfiguration.

      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      try {
       (...)
      
       User jbpmUser = identitySession.getUserByName(currentUser);
       if (jbpmUser != null) {
       List allTaskInstanceList = jbpmContext.getTaskList(currentUser);
       (...)
       }
       } catch (Exception e) {
       (...)
       } finally {
       jbpmContext.close();
       }
      


      Do you have any ideas? Did you encounter this problem before?
      Thanks,
      Val

      Exceptions:


      org.jbpm.JbpmException: couldn't get task instances list for actor 'hca'
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:65)
       at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.lookupNavigationList(TaskListTableTasklet.java:93)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.performSort(TaskListTableTasklet.java:149)
       at com.rsd.rbs.tasklet.TableTasklet.perform(TableTasklet.java:86)
       at com.rsd.rbs.action.UpdateTableAction.updateTable(UpdateTableAction.java:146)
       at com.rsd.rbs.action.UpdateTableAction.perform(UpdateTableAction.java:99)
       at org.apache.struts.action.Action.execute(Action.java:228)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1211)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:424)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at com.rsd.rbs.redirect.AbstractRedirectAdapter.processActionForward(AbstractRedirectAdapter.java:105)
       at com.rsd.rbs.action.MappingServlet.processForward(MappingServlet.java:520)
       at com.rsd.rbs.action.MappingServlet.processRequest(MappingServlet.java:332)
       at com.rsd.rbs.action.MappingServlet.doGet(MappingServlet.java:346)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: org.hibernate.exception.JDBCConnectionException: could not execute query
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.loader.Loader.doList(Loader.java:2223)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
       ... 37 more
      Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
      
      ** BEGIN NESTED EXCEPTION **
      
      java.net.SocketException
      MESSAGE: Software caused connection abort: socket write error
      
      STACKTRACE:
      
      java.net.SocketException: Software caused connection abort: socket write error
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
       at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
       at com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
       at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
       at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
       at org.hibernate.loader.Loader.doQuery(Loader.java:674)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
       at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.lookupNavigationList(TaskListTableTasklet.java:93)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.performSort(TaskListTableTasklet.java:149)
       at com.rsd.rbs.tasklet.TableTasklet.perform(TableTasklet.java:86)
       at com.rsd.rbs.action.UpdateTableAction.updateTable(UpdateTableAction.java:146)
       at com.rsd.rbs.action.UpdateTableAction.perform(UpdateTableAction.java:99)
       at org.apache.struts.action.Action.execute(Action.java:228)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1211)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:424)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at com.rsd.rbs.redirect.AbstractRedirectAdapter.processActionForward(AbstractRedirectAdapter.java:105)
       at com.rsd.rbs.action.MappingServlet.processForward(MappingServlet.java:520)
       at com.rsd.rbs.action.MappingServlet.processRequest(MappingServlet.java:332)
       at com.rsd.rbs.action.MappingServlet.doGet(MappingServlet.java:346)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      
      
      ** END NESTED EXCEPTION **
      
      
      
      Last packet sent to the server was 0 ms ago.
       at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2652)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
       at com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
       at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
       at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
       at org.hibernate.loader.Loader.doQuery(Loader.java:674)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       ... 45 more
      2008-06-16 08:52:43 ERROR [home.fol.TaskListTableTasklet][10.10.22.102][hca]: Task list creation
      org.jbpm.JbpmException: couldn't get task instances list for actor 'hca'
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:65)
       at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.lookupNavigationList(TaskListTableTasklet.java:93)
       at com.rsd.rbsfol.tasklet.bpm.NavigationTableTasklet.perform(NavigationTableTasklet.java:41)
       at com.rsd.rbs.tasklet.TableTasklet.perform(TableTasklet.java:98)
       at com.rsd.rbs.action.UpdateTableAction.updateTable(UpdateTableAction.java:146)
       at com.rsd.rbs.action.UpdateTableAction.perform(UpdateTableAction.java:99)
       at org.apache.struts.action.Action.execute(Action.java:228)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1211)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:424)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at com.rsd.rbs.redirect.AbstractRedirectAdapter.processActionForward(AbstractRedirectAdapter.java:105)
       at com.rsd.rbs.action.MappingServlet.processForward(MappingServlet.java:520)
       at com.rsd.rbs.action.MappingServlet.processRequest(MappingServlet.java:332)
       at com.rsd.rbs.action.MappingServlet.doGet(MappingServlet.java:346)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: org.hibernate.exception.JDBCConnectionException: could not execute query
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.loader.Loader.doList(Loader.java:2223)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
       ... 37 more
      Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:
      
      
      ** BEGIN NESTED EXCEPTION **
      
      com.mysql.jdbc.CommunicationsException
      MESSAGE: Communications link failure due to underlying exception:
      
      ** BEGIN NESTED EXCEPTION **
      
      java.net.SocketException
      MESSAGE: Software caused connection abort: socket write error
      
      STACKTRACE:
      
      java.net.SocketException: Software caused connection abort: socket write error
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
       at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
       at com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
       at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
       at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
       at org.hibernate.loader.Loader.doQuery(Loader.java:674)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
       at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.lookupNavigationList(TaskListTableTasklet.java:93)
       at com.rsd.rbsfol.tasklet.bpm.TaskListTableTasklet.performSort(TaskListTableTasklet.java:149)
       at com.rsd.rbs.tasklet.TableTasklet.perform(TableTasklet.java:86)
       at com.rsd.rbs.action.UpdateTableAction.updateTable(UpdateTableAction.java:146)
       at com.rsd.rbs.action.UpdateTableAction.perform(UpdateTableAction.java:99)
       at org.apache.struts.action.Action.execute(Action.java:228)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1211)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:424)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at com.rsd.rbs.redirect.AbstractRedirectAdapter.processActionForward(AbstractRedirectAdapter.java:105)
       at com.rsd.rbs.action.MappingServlet.processForward(MappingServlet.java:520)
       at com.rsd.rbs.action.MappingServlet.processRequest(MappingServlet.java:332)
       at com.rsd.rbs.action.MappingServlet.doGet(MappingServlet.java:346)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      
      
      ** END NESTED EXCEPTION **
      
      
      
      Last packet sent to the server was 0 ms ago.
      
      STACKTRACE:
      
      com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
      
      ** BEGIN NESTED EXCEPTION **