1 Reply Latest reply on May 16, 2006 3:40 PM by Ronald van Kuijk

    Sporadic connection errors from jbpmContext.getGraphSession(

    shahzad bhatti Newbie

      I noticed that occasionally following statement fails:
      jbpmContext.getGraphSession
      However, calling it again works. For example, I fixed above by
      try {
      jbpmContext.getGraphSession();
      } catch (org.hibernate.exception.JDBCConnectionException e) {
      jbpmContext.getGraphSession();
      }

      I have tried both hsqldb and mysqldb and I see same sporadic erros. Is this known problem? Here is full stack trace:


      org.hibernate.exception.JDBCConnectionException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:72) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:318) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:109) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1262) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:216) at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:427) at com.orbitz.txn.jbpm.TransactionWorkflowImpl.initContext(TransactionWorkflowImpl.java:449) at com.orbitz.txn.jbpm.TransactionWorkflowImpl.init(TransactionWorkflowImpl.java:250) at com.orbitz.txn.jbpm.command.CommandContextImplTest.testGet(CommandContextImplTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketExceptionMESSAGE: java.net.ConnectException: Connection refusedSTACKTRACE:java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:280) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774) at com.mysql.jdbc.Connection.(Connection.java:437) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:315) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:109) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1262) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:216) at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:427) at com.orbitz.txn.jbpm.TransactionWorkflowImpl.initContext(TransactionWorkflowImpl.java:449) at com.orbitz.txn.jbpm.TransactionWorkflowImpl.init(TransactionWorkflowImpl.java:250) at com.orbitz.txn.jbpm.command.CommandContextImplTest.testGet(CommandContextImplTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)** END NESTED EXCEPTION ** at com.mysql.jdbc.Connection.createNewIO(Connection.java:1839) at com.mysql.jdbc.Connection.(Connection.java:437) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:315) ... 25 more

        • 1. Re: Sporadic connection errors from jbpmContext.getGraphSess
          Ronald van Kuijk Master

          It is not a known problem. To me this looks a network or connectivity issue:

          Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
          ** BEGIN NESTED EXCEPTION **
          java.net.SocketExceptionMESSAGE: java.net.ConnectException: Connection refused
          STACKTRACE:
          java.net.SocketException:
          java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
           at com.mysql.jdbc.MysqlIO.(MysqlIO.java:280)


          The cause could vary from a lack of open file handles (on linux) to whatever.