My Oracle Support Banner

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:

ResultSet rs = . . . ;
Character c = rs.getObject(1, java.lang.Character.class);

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.


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.