My Oracle Support Banner

JDBC Connection Validation Broken in GlassFish Server 2.1.1 Patch 9 and Patch 10 (Doc ID 1289919.1)

Last updated on FEBRUARY 26, 2019

Applies to:

Oracle GlassFish Server - Version 2.1.1 to 2.1.1 [Release 2.1]
Information in this document applies to any platform.


The typical symptom for this problem is your application receiving a SQLException from a connection that has just been obtained from a JDBC Connection Pool.  For example:

[#|2011-01-31T14:39:28.209+0000|INFO|sun-appserver2.1.1||_ThreadID=16;_ThreadName=httpSSLWorkerThread-2111-0;|java.sql.SQLException: No more data to read from socket
        at oracle.jdbc.driver.DatabaseError.throwSqlException(
        at oracle.jdbc.driver.DatabaseError.throwSqlException(
        at oracle.jdbc.driver.DatabaseError.throwSqlException(
        at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(
        at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(
        at oracle.jdbc.driver.T4C8Oall.receive(
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(
        at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(
        at org.apache.jsp.pool_jsp._jspService( from :114)
        at org.apache.jasper.runtime.HttpJspBase.service(

Note that the SQLException received could vary depending on the SQL operation being attempted as well as on the version of JDBC driver or database being used.

In addition, the JDBC Connection Pool must have been configured with validation enabled, in the example below replace "OraclePool" with the name of your JDBC Connection Pool:

$ asadmin get --user admin = true

If the connection pool does not have validation enabled then seeing SQLExceptions in your application is entirely possible as the connection pool does not test the connection before supplying it to your requesting application.  Therefore, if the database has been restarted, the pool will contain "bad" connections which potentially won't be removed until the instance is restarted, and will cause errors until it is.


You've upgraded from an earlier version of the GlassFish Server to either 2.1.1 patch 9 or patch 10.


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.