Support Article

Cannot create PoolableConnectionFactory after Java minor update

SA-37785

Summary



User upgraded Java from jdk 1.7.0_111-64 to 1.7.0.131-64.

After updating Java minor versions, getting errors on startup of instances trying to connect to the Oracle database.

Note that system is running on Unix.

Error Messages



Caused by: java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:467)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)

Steps to Reproduce



Upgrade to Java to jdk1.7.0_131-64.


Root Cause



A defect or configuration issue in the operating environment.

When running in a Unix environment connections to an Oracle database using newer versions of the Oracle JDBC driver need to use /dev/urandom and not /dev/random.

If /dev/random is used the connection to the Oracle database will take longer and can result in the connection timing out.

This article provides more details on why urandom is needed:
https://pdn.pega.com/support-articles/sqlrecoverableexception-installing-pega-72-oracleunix

In the new Java version the securerandom.source property is not specified correctly in the $JAVA_HOME/jre/lib/security/java.security file.

As a result the default /dev/random is being used.


Resolution



Make the following change to the operating environment to force the Oracle JDBC driver to use urandom:

Update $JAVA_HOME/jre/lib/security/java.security to use securerandom.source=file:/dev/./urandom

Or

Set system property -Djava.security.egd=file:///dev/urandom

Published May 10, 2017 - Updated June 5, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.