GetColumns() Generates Java.lang.IllegalArgumentException: Cannot Set INT On Column With JDBC 12.2

(Doc ID 2390156.1)

Last updated on APRIL 25, 2018

Applies to:

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

Symptoms

Application using JDBC 12.2.0.1 (ojdbc8.jar) receives the following error when calling getMetaData().getColumns() in application to get type (java.sql.Types) of each column in the database.
This error does not present itself  with 12.1.0.2 ojdbc6.jar or ojdbc7.jar.

java.lang.IllegalArgumentException: cannot set INT on column: LAST_ACTY_DAY_NBR

The column is defined as :

LAST_ACTY_DAY_NBR NUMBER(3,0)



Changes

 

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