2 Replies Latest reply: Feb 27, 2012 7:06 PM by user2363353 RSS

    Oracle db connection reset error

    user2363353
      Currently using toplink to manage the db connection and we see the following error in the logs file. Is there way to avoid exception being thrown?

      Here is the stack trace:

      Caused by: Portable(java.sql.SQLRecoverableException): IO Error: Connection reset
      at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1065)
      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1199)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:931)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
      at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
      at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
      at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:207)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectRowForDoesExist(DatasourceCallQueryMechanism.java:688)


      Any help is much appreciated.
        • 1. Re: Oracle db connection reset error
          JamesSutherland
          The issue is that your database connection has been lost somehow. This may be caused by a timeout in your database or firewall, or a database or network error.

          You can either try resolve the database/network issue, or workaround the issue.

          In TopLink by default when using a recent version of EclipseLink, dead connections should be automatically detected and reconnected. You will still get the error, but the connection will be dropped form the pool and a new connection used for the query. If you just want the error out of your log, then disable logging or disable exception logging.

          To avoid the issue entirely, you could disable connection pooling by setting your min pool size to 0, but this can adversely affect performance.

          You could also use a third party DataSource such as Oracle UCP, that provides additional dead connection resolution solutions.
          • 2. Re: Oracle db connection reset error
            user2363353
            Thanks for the response.

            It seems to match my analysis.