My Oracle Support Banner

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

Last updated on AUGUST 30, 2023

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


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(
      at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(
Exception in thread "main" java.lang.NullPointerException
      at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(
      at oracle.jdbc.driver.OraclePreparedStatement.addBatch(
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.addBatch(
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.addBatch(
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:






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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.