My Oracle Support Banner

JDBC Driver 12.1.0.1 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 12.1.0.1.0 and later
Information in this document applies to any platform.

Symptoms

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

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


and

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.

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.