My Oracle Support Banner

Double Values Outside The Allowed Range Throw Nullpointerexception in JDBC 11.2.0.3 (Doc ID 1508821.1)

Last updated on FEBRUARY 03, 2019

Applies to:

JDBC - Version 11.2.0.3.0 and later
Information 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)
      at OraDoubleIssues.test(OraDoubleIssues.java:63)
      at OraDoubleIssues.main(OraDoubleIssues.java:26)
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)
      at OraDoubleIssues.test(OraDoubleIssues.java:73)
      at OraDoubleIssues.main(OraDoubleIssues.java:26)

 
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:

   

 

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
Cause
Solution
References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.