DB2 - Problem description
Problem IT36131 | Status: Closed |
UNEXPECTED ERROR SEVERITY CODE 8 ERRORCODE=-4228, SQLSTATE=NULL WHEN USING PREPARED STATEMENT WITH SETARRAY METHOD | |
product: | |
DB2 CONNECT / DB2CONNCT / B50 - DB2 | |
Problem description: | |
Java application that uses prepared statement with setArray method is not supported. Unexpected error is thrown Severity code 8. No exception code returned from server. ERRORCODE=-4228, SQLSTATE=null. This problem will be fixed in JCC version 4.31.xx (V11.5.7.0) setArray Method is not supported as per documentation below, https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ib m.db2.luw.apdv.java.doc/src/tpc/imjcc_rjvjdapi.html Symptom: Code snippet resulted in a wrong error, PreparedStatement ps = con.prepareStatement("select count from person where name in "); PreparedStatement ps = con.prepareStatement("select count from person where name in "); String[] passwordString = new String[] { "tt", "ee", "ss", "tt" }; Array sqlArray = con.createArrayOf("VARCHAR", passwordString); ps.setArray(1, sqlArray); | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Db2 JCC Driver Users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Jcc 4.31.xx (V11.5.7.0) or later. Apply APAR * * PH39502 in Db2 12 for z/OS . * **************************************************************** | |
Local Fix: | |
None. setArray Method is not supported as per documentation below, https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ib m.db2.luw.apdv.java.doc/src/tpc/imjcc_rjvjdapi.html | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * Db2 JCC Driver Users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Jcc 4.31.xx (V11.5.7.0) or later. Apply APAR * * PH39502 in Db2 12 for z/OS . * **************************************************************** | |
Comment | |
Problem will be fixed in Jcc 4.31.xx (V11.5.7.0). This APAR fix is applicable only if server side APAR PH39502 is applied in Db2 12 for z/OS And Client side property retrieveMessagesFromServerOnGetMessage is set to true | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.03.2021 13.10.2021 13.10.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |