IBM Support


A fix is available


You can track all active APARs for this component.


APAR status

  • Closed as new function.

Error description

  • New release of the IBM DB2 Driver for JDBC and SQLJ (release
    3.57) providing various enhancehment and service updates.

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All Users of the                             *
    *                 IBM DB2 Driver for JDBC and SQLJ             *
    * PROBLEM DESCRIPTION: IBM DB2 Driver for JDBC and SQLJ        *
    *                      version 3.57.91 is provided by this     *
    *                      APAR ( JCCV35791 )                      *
    *                                                              *
    *                      This APAR is applicable to              *
    *                      IBM DB2 Driver for JDBC and SQLJ        *
    *                      for both DB2 z/OS V9 and the            *
    *                      alternate supplemental driver           *
    *                      for DB2 z/OS V8.                        *
    *                      ( JCCZOSDB2V8, JCCZOSDB2V9 )            *
    *                                                              *
    *                      This APAR delivers a new release (3.57) *
    *                      of the IBM DB2 Driver for JDBC and SQLJ *
    *                      providing an accumulation of defect     *
    *                      fixes and enhancements.                 *
    *                                                              *
    *                      Individual items are documented in the  *
    *                      APAR summary section that follows.      *
    * RECOMMENDATION:                                              *
    JCC sub-category keywords:
    The following changes are delivered in this APAR:
    All Connectivity: Driver code has been enhanced to support
    the describe of a PL/SQL procedure which has input/output
    parameters defined as BOOLEAN when targeting DB2 for LUW
    V9.7 or above servers. ParameterMetaData methods
    getParameterClassName(), getParameterType(),
    getParameterTypeName(), getParameterPrecision(),
    getParameterScale() will return "java.lang.Boolean", 16,
    "BOOLEAN", 1, and 0, respectively, for a parameter defined
    as BOOLEAN. (120680)
    All Connectivity: Commit is not flown when
    returns false and autoCommit is turned on if
    property queryCloseImplicit is set to
    All Connectivity: If auto-generated keys is specified
    with the constant RETURN_GENERATED_KEYS and table does not
    contain an auto-generated column(s),
    Statement.getGeneratedKeys() may return a non-empty
    ResultSet.  This problem has been corrected to return an
    empty ResultSet. (112317)
    All Connectivity: Driver code has been enhanced such that
    driver will automatically retry execution upon receiving
    SQLCODE30002 (-30002) on java.sql.PreparedStatement's.
    All Connectivity: Driver code has been enhanced to support
    a new API on
    getParameterMarkerNames, which returns a list of parameter
    marker names used in the SQL Statement as a String  .
    This method returns null if property
    enableNamedParameterMarkers is set to
    DB2BaseDataSource.NOT_SET or DB2BaseDataSource.NO, or if
    there are no named parameter markers in the SQL Statement.
    The list returned contains unique parameter marker names.
    If a named parameter marker appears more than once in the
    SQL Statement, it will only appear once in the list
    returned. (120191)
    All Connectivity: If auto-generated keys is specified with
    the constant RETURN_GENERATED_KEYS, SQLCODE4470 (-4470)
    with message "Invalid operation: result set is closed" is
    encountered while processing the ResultSet returned from
    Statement.getGeneratedKeys().  This problem has been
    corrected. (127025)
    All connectivity: A new connection property
    "useAtomicMultiRowInsert" has been added.  When set to (1), all batch
    INSERT statements on DB2 for z/OS will execute atomically.
    On DB2 for Linux, Unix, and Windows, DB2 for i, and
    Informix Data Server, turning this property on will also
    cause a batch MERGE, batch UPDATE, and batch DELETE
    statements to execute atomically in addition to batch INSERT
    statements.  When set to
    (2), or (0)
    (default), these statements will execute non-atomically, as
    they have in all previous versions. (118660)
    All Connectivity: Driver code has been enhanced to support
    named parameter markers.  A new property is introduced on,
    enableNamedParameterMarkers, to specify whether named
    parameter markers support is enabled in the driver.
    The default for this property is NOT_SET(0) which means
    support is not enabled.
    Named parameter markers, defined as a colon followed by
    an alphabetic character followed by any combination of
    alphanumeric or the underscore (_) character, may be used
    in place of standard parameter markers (?) in SQL
    statements. Mixing named and standard parameter markers
    in the same SQL string is not supported.
    New APIs to set and register named parameters have been
    added to the DB2PreparedStatement and DB2CallableStatement
    interfaces. Examples of these APIs include
    setJccIntAtName (String parameterMarkerName, int x) and
    registerJccOutParameterAtName(String parameterMarkerName,
    int sqlType). Parameter marker names are treated as case
    Currently only certain statements are supported for named
    parameter markers, these include: INSERT, UPDATE, DELETE,
    CALL, SELECT, and SET. (109658)
    All Connectivity: Driver code has been enhanced to support
    the get by name APIs on the CallableStatement.  These
    are getter methods which take a String argument for
    parameterName.  Previously, driver throws a "Method not
    yet supported" exception. Now when a valid parameterName
    is specified, it will behave exactly as if the
    corresponding get by parameterIndex method is called. (110220)
    All Connectivity: Driver fails to cross convert numeric types
    with leading spaces for input string data.  For example,
    PreparedStatement.setString(4, " 00006.35") contains a data
    string with a leading space will result in an SQLException
    (-99999) (SQLCODE99999) "Invalid data conversion". (117915)
    All Connectivity: Driver used to check the license even
    though the application is trying to connect to a server via a
    DB2 gateway.  Driver will not check license any more. (121546)
    All connectivity: When connecting against DB2 for z/OS,
    locator based CLOBs encoded with the 943c codepage will
    cause unpredictable behavior.  Against DB2 for z/OS V9, when
    progressive streaming is enabled, attempts to access a
    cp943c encoded Clob may not work properly.  This issue has
    been resolved. (117719)
    All Connectivity: During dynamic execution of a SQLJ
    application, the line feed, carriage return, and space
    characters were being incorrectly removed from the SQL
    statement.  This may cause problems if any embedded
    SQL string contains formatting that needs to be preserved.
    All connectivity: Previously, driver treats Varchar and Clob
    as incompatible data types for In-Out parameters.  For an
    In-Out parameter, if user registers Out parameter as Clob,
    and uses setString for the same parameter, the driver throws
    SQLException with the message "The jdbcType 12 does not match
    between the set method and the registerOutParameter method".
    Driver will now make Varchar and Clob compatible In-Out
    parameter data types. (109965)
    All Connectivity: If QueryTimeOut is set and an exception
    with SQLCODE4499 (-4499) is thrown, Statement.cancel()
    may cause a NullPointerException. This problem has been
    fixed. (118002)
    All Connectivity: If the target server is LUW DB2 and
    Datasource property retrieveMessagesFromServerOnGetMessage
    sets to true, SQLException.getMessage() may return garbage
    characters if locales are Arabic locales ar-ae and ar_de.
    The problem has been fixed. (122005)
    All Connectivity: If the target server is LUW DB2 and client
    reroute happens, the current schema may not set on the
    alternative server.  This will cause SQLException with
    error code SQLCODE204 (-204). This problem is fixed. (119922)
    All Connectivity: Starting in DB2 LUW v9.7, the server
    supports the behavior of concentrating statements with
    literals that are executed dynamically for improved
    performance.  The support for this feature is enabled in
    the driver. (116066)
    All Connectivity: JRE 1.6 was not listed as one of the
    compatible jre versions in the trace for Jcc 3.52 release and
    above.  This has been fixed. (117664)
    All Connectivity: SQLCODE805 (-805) SQLException was thrown
    when both currentPackagePath and currentFunctionPath
    datasource properties are set. The problem is fixed. (122488)
    XA Connectivity: A NullPointerException might occur on
    DB2XADataSource.getDB2TrustedXAConnection() method when
    enableEndToEndMonitoringFeature property is set to true.
    All Connectivity:
    When Statement.cancel gets called (this may be called
    explicitly or trigged by Statement.setQueryTimeout),
    if something is wrong with DB2 server and a
    DisconnectException occurs, a NullPointerException may
    be issued from java.util.LinkedList$ListItr.remove.
    This is because both cancel thread and main thread use
    the same LinkedList and Iterator for Exception path.  In the
    race condition, one thread already remove the element from
    the LinkedList when the other thread tries to remove, this
    caused the NPE. The problem has been fixed. (128074)
    Type-4 XA Connectivity: In a multi-thread and heavy load XA
    environment, when transaction manager does XA(start), XA(end)
    using one XAResource object and XA(prepare), XA(commit or
    rollback) using a different XAResource object, the driver may
    throw XAER_RMFAIL, XAER_DUP, or XAER_PROTO error.  This error
    will not occur when transaction manager uses the same
    XAResource object for all XA operations per transaction.
    Type-4 XA Connectivity: If an application is trying to open
    a XA connection and the DB2 server it connected does not
    support XA, the driver should throw an Exception immediately
    instead of letting the application continue after connection.
    Type-4 XA Connectivity: A XAException with SQLCODE4223
    (-4223) along with a SQLCODE4474 (-4474) with the following
    message "Cannot change current package path when pre-existing
    package sets are in use on the connection." might be reported
    if "currentPackagePath" property is set by the
    DB2Connection.reconfigureDB2Connection() method. (124318)
    Type-4 XA Connectivity: In a sysplex environment, a
    XAException with SQLCODE4203 (-4203) is reported while
    resolving an indoubt transaction that can be on any of the
    data sharing members of the sysplex group. (122265)
    Type-4 XA Connectivity: Under sysplexWLB environment, if an
    application or WebSphere is trying to commit an indoubt
    transaction from a specific member that is down, the driver
    might throw a XAER_RMFAIL XAException instead of a
    XA_RETRY XAException. This will prevent application or
    WebSphere to retry the commit action.  Driver will now throw
    XAER_RETRY instead of XAER_RMFAIL to indicate it need retry
    the operation. (122451)
    Type-4 XA Connectivity: A NullPointerException will be
    thrown if XAResource.forget() is called twice with the
    same xid. (123668)
    Type-4 Connectivity: Driver code has been enhanced to
    support a new value, QUERY_CLOSE_IMPLICIT_COMMIT(3),
    for JCC property queryCloseImplicit.  This value indicates
    that server must implicitly close the cursor upon SQLSTATE
    02000 and in addition may choose to also implicitly commit
    the current unit of work.  When running against DB2 for z/OS
    Version 8 and Version 9, server APAR PK68746 is required to
    support this new value.  DB2 for LUW V9.7 recognizes this
    new value but will not attempt to perform the commit.
    Type-4 Connectivity: Driver code has been enhanced to support
    timestamp with variable length (timestamp declared as
    timestamp(p) where p is the precision from 0 to 12) for LUW
    DB2 V9.7. (109057)
    Type-4 Connectivity: In the event of exceptions or warnings,
    the SQLJ Binder did not provide information about failing
    statements.  This posed a difficulty in identifying the
    statements that failed to bind.  The user will be provided
    detailed diagnostic information on exceptions/warnings
    encountered during the BIND step.  This detailed information
    includes the SQL statement, the line number the SQL is located
    at, error/warning code, sqlstate and the message. (118295)
    Type-4 Connectivity: A DisconnectException was thrown when
    setting blobs via setObject() while doing a batch stored
    procedure call.  This problem is fixed now. (109976)
    Type-4 Connectivity: Starting DB2 LUW v9.7, server supports
    Cursor type, a reference to an open cursor, to be
    returned as an OUT parm on stored procedure. The support
    for this feature is enabled in the driver. (118827)
    Type-4 Connectivity: When a valid server side syntax for
    DRDA bind and rebind option is specified while binding
    generic packages via DB2Binder, the driver throws an
    exception currently. This has been fixed. (122059)
    Type-2 z/OS Connectivity: When autoCommit is enabled,
    executing a stored procedure which has an OUT parameter,
    or a SQLJ statement with an output host variable will cause
    an unnecessary commit.  If this OUT parameter or host
    variable is a BLOB, CLOB, or DBCLOB, and LOB locators are
    being used by the application, these locators will never be
    valid in the application.  This issue effects all backend
    servers, and has been resolved. (125511)
    Type-2 z/OS Connectivity: SQLException of a DLL loading
    failure now includes the hint of possible causes. (110754)
    Type-2 z/OS Connectivity: File reference variable is now
    supported when targeting DB2 V9 NFM. (59667)
    Type-2 z/OS Connectivity: When tracing, driver traces the iti
    object which includes all of the currently registered
    interrupt objects.  The driver will trace the iti object as a
    string consisting of the name of the class of the iti object,
    the at-sign character `@', and the unsigned hexadecimal
    representation of the hash code of the iti object. (117747)
    Type-2 z/OS Connectivity: executeUpdate() of an SQL CALL
    statement is returning an update count of "0" if no
    ResultSet is returned.  This was not consistent with
    the Type-4 behavior, which always returns an update
    count of "-1" for an SQL CALL.  The Type-2 z/OS
    behavior has been changed to be consistent with
    Type-4 behavior and will now always return "-1"
    for executeUpdate() of an SQL CALL statement. (117065)
    Type-2 z/OS Connectivity: A secondary SIGSEGV may occur in
    the driver's signal handler if a signal is raised prior to
    the completing initialization. (84936)
    Type-2 z/OS Connectivity: In order to improve problem
    diagnosis, additional failure information has been added
    to the SQLException message text for "DSNHLI Internal Error"
    SQLExceptions that might be thrown by the driver. (104264)
    SQLJ and Type-4 Connectivity: SQLJ Binder did not process the
    bind option ACTION ADD correctly and was not working as
    documented.  The effect was same as specifying ACTION REPLACE.
    This has now been fixed. (119340)
    SQLJ and All Connectivity: SQLJ Translator gives a syntax
    error of the form: Error: Host item #nnnn cannot be OUT or
    INOUT.  This occurs when SQLJ CALL statements are used with
    named INOUT or OUT parameters.  This has now been fixed.
    SQLJ and Type-2 Connectivity: NullPointerException when SQLJ
    application uses Multi-Row Insert (MRI) for lob/xml data.
    This problem has been fixed. (126463)

Problem conclusion

Temporary fix


  • The items described in the APAR Problem
    Summary have been resolved as noted in
    the summary and included in this APAR.

APAR Information

  • APAR number


  • Reported component name


  • Reported component ID


  • Reported release


  • Status


  • PE




  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date


  • Closed date


  • Last modified date


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

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

    UK48235 UK48236



Publications Referenced

Fix information

  • Fixed component name


  • Fixed component ID


Applicable component levels

  • R812 PSY UK48235

       UP09/07/11 P F907

  • R912 PSY UK48236

       UP09/07/11 P F907

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"812"}]

Document Information

Modified date:
04 March 2021