My Oracle Support Banner

Error "java.sql.SQLException: Invalid column type: 16" When Calling an PL/SQL Returning a Boolean from JDBC. (Doc ID 1113893.1)

Last updated on AUGUST 14, 2019

Applies to:

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

Symptoms

A Java application is calling an oracle package function that returns a boolean. When this application is executed, the following error is displayed:

ERROR - Exception in Main : Invalid column type: 16
Error : java.sql.SQLException: Invalid column type: 16


The Java program contains a dynamic statement that uses bind variables, like this:

package = "{?=call emp.empFunctionUpdate(?, ?, ?, ?)}";

callableStatement_pkg = conn.prepareCall(package );
callableStatement_pkg.registerOutParameter(1, Types.BOOLEAN);
...
callableStatement_pkg.execute();
boolean updateResult = callableStatement_pkg.getBoolean(1);


As seen in the previous code segment, one of the variable types is defined as Boolean, and the getBoolean method is used to retrieve its value

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


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