Getting Destroying connection that is not valid, due to ... java.sql.SQLException: pingDatabase failed status=XX against Oracle database in JBoss EAP
Issue
- Getting the following Warning in
server.log
:
WARN [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@31625c24
java.sql.SQLException: pingDatabase failed status=-1
at org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker.isValidConnection(OracleValidConnectionChecker.java:74)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:560)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:364)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:402)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:225)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:689)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
- Also getting a similar message with:
java.sql.SQLException: pingDatabase failed status=-2
- We are getting Intermittent Connectivity issue in
JBOSS
. - we have getting error: jndiName=java:jboss/datasources/testDS] txSync=null]: java.sql.SQLException: pingDatabase failed status=-2
10:35:01,138 WARN [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$MyXaMCF] (Thread-15476 (HornetQ-client-global-threads-772572177)) Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.LogicalConnection@491d7106: java.sql.SQLException: pingDatabase failed status=-2
at org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker.isValidConnection(OracleValidConnectionChecker.java:74)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1173)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:461)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.x
- 5.x
- 6.x
- 7.x
- Using an Oracle database + having configured the datasource to use the
OracleValidConnectionChecker
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.