IBM Support

APAR IT21363 : Unkown column TYPE_NAME exception with errorcode -4460 occurs when call to getString("DATA_TYPE") is made

Question & Answer


Question

Why does JCC driver throws error -4460 with exception,  when getString("DATA_TYPE") is invoked by application for a user defined database column DATA_TYPE?

Cause

This is a bug introduced in JCC 4.23.50

Answer

JCC driver is attempting to invoke getString("TYPE_NAME") when the user defined column name is "DATA_TYPE".
 
E.g: 
column name = DATA_TYPE
Querying database: select DATA_TYPE from <table_name>

when getString("DATA_TYPE") is invoked by application to retrieve the column value from the result set, driver implicitly calls getString("TYPE_NAME") which results in ERRORCODE=-4460 as below:
Invalid parameter: Unknown column name TYPE_NAME. ERRORCODE=-4460, SQLSTATE=null
This problem is fixed in JCC version 4.24.92 (db2_v111m3fp3)
Local  fix or workaround:
The error and exception can be avoided if the SQL is modified to have a AS clause.
e.g:
​​SELECT ID, DATA_TYPE AS DTYPE FROM <table_name>
​
​
and fetch the result using getString("DTYPE").

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PmVAAU","label":"Programming Interface->JDBC"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1.0"}]

Document Information

Modified date:
13 October 2021

UID

ibm16498467