Double Values Outside The Allowed Range Throw Nullpointerexception in JDBC 11.2.0.3
(Doc ID 1508821.1)
Last updated on AUGUST 30, 2023
Applies to:
JDBC - Version 11.2.0.3.0 and laterInformation in this document applies to any platform.
Symptoms
The same issue reported in <Bug 14222149> NAN USAGE IN JDBC RESULTS IN NULLPOINTEREXCEPTION can occur with additional values other than NaN/Infinity.
Double values outside the allowed range for an Oracle double fail with the following error:
java.sql.BatchUpdateException: Internal Error: Underflow Exception trying to bind 1.0E-300
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10345)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:230)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
Exception in thread "main" java.lang.NullPointerException
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1885)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:10058)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.addBatch(OraclePreparedStatementWrapper.java:1360)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.addBatch(NewProxyPreparedStatement.java:131)
The error occurs not on the statement.setDouble(), but during the statement.executeBatch() statement. And then following this, the prepared statement is then broken, and throws NullPointerExceptions if re-used.
Example code:
Changes
Cause
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
Symptoms |
Changes |
Cause |
Solution |
References |