My Oracle Support Banner

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

Last updated on FEBRUARY 03, 2019

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(
      at OraDoubleIssues.test(
      at OraDoubleIssues.main(
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(
      at OraDoubleIssues.test(
      at OraDoubleIssues.main(

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

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.