DB2 stored procedure update fails after upgrading the DB2 JDBC driver.

DB2 stored procedure update fails after upgrading the DB2 JDBC driver.

book

Article ID: KB0085852

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
DB2 stored procedure update fails after upgrading DB2 JDBC driver.
Symptoms:
When BW tries to execute the stored procedure, the following error is thrown.

 Error [BW-Plugin] BW-JDBC-100014 Job-95000 Error in [Processes/Call Stored Proc.process/JDBC Call Procedure]
"JDBC error reported: (SQLState = null) - com.ibm.db2.jcc.am.SqlException: [jcc][10150][10300][4.14.113] Invalid parameter: Unknown column name <COLUMN_NAME>. ERRORCODE=-4460, SQLSTATE=null"
at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
...
caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10150][10300][4.14.113] Invalid parameter: Unknown column name <COLUMN_NAME>. ERRORCODE=-4460, SQLSTATE=null
at com.ibm.db2.jcc.am.ed.a(ed.java:661)
at com.ibm.db2.jcc.am.ed.a(ed.java:60)
at com.ibm.db2.jcc.am.ed.a(ed.java:103)
...

<COLUMN_NAME> - will be replaced with affected DB data

Cause:
This is due to a JDBC 4.0 API change. The ResultSetMetaData class for this version of the driver returns the column name (defined in the database) for the getColumnName() call. It returns the ALIAS name only  getColumnLabel() is called. BW has always used getColumnName().

Issue/Introduction

DB2 stored procedure update fails after upgrading the DB2 JDBC driver.

Resolution

Add the following property to the DB connection URL.

:useJDBC4ColumnNameAndLabelSemantics=false;

For example:

jdbc:db2://localhost:50000/DBSCHEMA:useJDBC4ColumnNameAndLabelSemantics=false

Additional Information

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.5.0/com.ibm.db2.luw.wn.doc/doc/i0052606.html?lang=en