My Oracle Support Banner

JDBC Applications: Handling NULL Values Returned into Result Sets (Doc ID 1079810.6)

Last updated on MARCH 18, 2024

Applies to:

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

Symptoms

 Problem Description:
====================
Your client application uses JDBC.  In this program you return a result set
where some of the column values returned are NULL.

When you try to make assignments to local JDBC variables, as the following example
illustrates, you encounter the NullPointerException error.
 
 
Problem Explanation:
====================
Here is one example where this could occur, but there may be other cases too.
                 

 
The problem is encountered on the 5th and 6th element of the result set.

Changes

 

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!


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