IBM Support

IC64831: JCC THROWS SQLEXCEPTION WITH ERROR CODE -4476 WHEN PREPAREDSTATEMENT.EXECUTEQUERY() DOESN'T RETURN A RESULTSET.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • If PreparedStatement.executeQuery() doesn't return a ResultSet,
    JCC throws SQLException with error code -4476. This behavior is
    JDBC compliant. Now we add a new DataSource property
    allowNullResultSetForExecuteQuery, the type of this property is
    integer and the default is
    com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET. If it is set to
    com.ibm.db2.jcc.DB2BaseDataSource.YES, JCC will NOT throw
    SQLException if executeQuery returns null ResultSet. This
    behavior is not compliant with JDBC specification. This property
    only applies to SQL CALL statement.
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * N/A                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * If PreparedStatement.executeQuery() doesn't return a         *
    * ResultSet, JCC throws SQLException with error code -4476.    *
    * This behavior is JDBC compliant. Now we add a new DataSource *
    * property allowNullResultSetForExecuteQuery, the type of this *
    * property is integer and the default is                       *
    * com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET. If it is set to   *
    * com.ibm.db2.jcc.DB2BaseDataSource.YES, JCC will NOT throw    *
    * SQLException if executeQuery returns null ResultSet. This    *
    * behavior is not compliant with JDBC specification. This      *
    * property only applies to SQL CALL statement.                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 1.                       *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.7 Fix Pack 1.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC64831

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-11-30

  • Closed date

    2010-04-26

  • Last modified date

    2010-04-26

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

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

    IC64969

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 #: IC64831

Modified date: 26 April 2010