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:
at org.apache.jsp.pool_jsp._jspService(pool_jsp.java from :114)
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:
domain.resources.jdbc-connection-pool.OraclePool.is-connection-validation-required = 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