IBM Support

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

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error 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.
    

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.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 9.7 Fix Pack 6                                *
    ****************************************************************
    

Problem conclusion

  • First Fixed in DB2 9.7 Fix Pack 6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC80974

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-01-24

  • Closed date

    2017-05-09

  • Last modified date

    2017-05-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC81352

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC80974

Modified date: 09 May 2017