While migrating from Oracle 11g to Oracle 12 c, we are getting below error using UCP(12.1.0.2.0)
java.sql.SQLException: The connection is closed: The connection is closed
at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:464)
at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:448)
at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:307)
at oracle.ucp.jdbc.proxy.ConnectionProxyFactory.invoke(ConnectionProxyFactory.java:50)
at com.sun.proxy.$Proxy24.prepareStatement(Unknown Source)
This is multithreaded application where we take connection from UCP pool, use it and then close the connection. However for some of the operation we are getting the above error on the line - connection.prepareStatement(statement) We are using PoolDataSource
Few things tried 1) Using default values for connection pool and only setting minimum, maximum pool size. 2) Setting setValidateConnectionOnBorrow as true, 3) Setting setValidateConnectionOnBorrow as true and setValidateConnectionOnBorrow as "SELECT 1 FROM DUAL" 4) Using Labelled Connection 5) The db doesn't disconnect the connection after a particular time and also there is no firewall which blocks connection. 6) Using setMaxConnectionReuseTime
I have referred few links which shows similar issues. However it doesn't show any resolution https://community.oracle.com/thread/2183613
https://community.oracle.com/thread/2298699
The connection is closed when using Oracle UCP
Has anyone faced similar issue on Oracle 12C with UCP?? Is there some bug in latest UCP??