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 DECEMBER 06, 2010

Applies to:

JDBC - Version: and later   [Release: 11.1 and later ]
Information in this document applies to any platform.


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

100525-18:03:44,953 ERROR sws.aim.InvokeAIM - 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:

process_pkg = "{?=call pkg.fn_update(?, ?, ?, ?)}";

callableStatement_pkg = conn.prepareCall(process_pkg);
callableStatement_pkg.registerOutParameter(1, Types.BOOLEAN);
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


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