Java.sql.SQLException: Invalid Column Index with JDBC 11.2.0.4 and JDBC 12.1.0.x drivers while updating columns using setLong, setInt, and setObject (Doc ID 2166831.1)

Last updated on MAY 04, 2017

Applies to:

JDBC - Version 11.2.0.4.0 to 12.2.0.0.0 [Release 11.2 to 12c]
Information in this document applies to any platform.

Symptoms

JDBC application fails with java.sql.SQLException: Invalid column index
while updating the columns using setLong(), setInt, and setObject() accessors.

The issue is specific to JDBC version 11.2.0.4, JDBC 12.1.0.1, and 12.1.0.2.  It does not occur with JDBC 11.2.0.3 and older versions

Code example:

 

Cause

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