My Oracle Support Banner

JBoss Application Server Shows "pingDatabase failed status=-2" When Connecting to Oracle RDBMS (Doc ID 1446547.1)

Last updated on DECEMBER 01, 2017

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


Using the Oracle 11.x thin JDBC driver with a connection pool in the JBoss application server, J2EE applications intermittently fail to get a connection to the database server. The JBoss connection pool reports a failure while validating an open connection. The failure is signalled by the JDBC driver's pingDatabase(timeout) method returning a status code of -2.

The JBoss server may show the following stack back-trace:

WARN [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] (pool-41-thread-26) Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@5e464991
java.sql.SQLException: pingDatabase failed status=-2
        at org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker.isValidConnection(
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(
        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.