JDBC Driver Returns Zero From GetObject(1, Long.class) When Value Is Null

(Doc ID 1640052.1)

Last updated on MARCH 08, 2017

Applies to:

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


Version of the Oracle JDBC driver adds support for the following getObject methods:

T getObject(int parameterIndex,
  java.lang.Class type)
  throws SQLException


T getObject(java.lang.String parameterName,
  java.lang.Class type)
  throws SQLException

For example:

However, when using these new implementations, a NULL value is incorrectly returned as a 0 (zero) for the java.lang.Long and java.lang.Integer classes.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms