home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC80974 Status: Closed

CALLABLESTATEMENT GETOBJECT () CALL DOES NOT RETURN DATA TYPE BASED ON THE
REGISTEROUTPARAMETER TYPE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
This issue affects applications utilizing the IBM Data Server 
Driver for JDBC and SQLJ, calling stored procedures with OUT or 
INOUT parameters. 
 
The JDBC CallableStatement.getObject () function call does not 
necessarily return an object type that matches with the data 
type specified on the parameter bind (registerOutParameter) 
operation. 
This may cause the application to fail with a 
java.lang.ClassCastException. 
 
For Out or Inout parameters on CallableStatement, if the 
application registers a type that does not match with the server 
data type, and getObject() is used to retrieve the output, the 
data type of the Java Object returned by the driver will be 
based on the server type instead of the registered type.  A 
java.lang.ClassCastException maybe thrown when customer's 
application trying to cast the Java Object to their expected 
Java Object. 
 
To fix this, the driver will, in future releases return a Java 
Object based on the registered type rather than the server type. 
If a registered type is not supported for the server type, the 
driver will return a Java Object based on the server data type.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 9.7 Fix Pack 6                                * 
****************************************************************
Local Fix:
Use the getXXX () function call (e.g. getString, getInt, 
getDouble) instead of getObject () to ensure that an object of 
the intended data type is returned.
available fix packs:
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
First Fixed in DB2 9.7 Fix Pack 6
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC81352 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
24.01.2012
09.05.2017
09.05.2017
Problem solved at the following versions (IBM BugInfos)
9.7.FP6
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.6 FixList