IBM Support

IY62616: "COM.IBM.DB2.JCC.C.SQLEXCEPTION: PREPAREDSTATEMENT: SETNULL METHOD SETTING A NON-NULLABLE INPUT PARAMETER 9 TO NULL."

 

APAR status

  • Closed as program error.

Error description

  • When trying setNull on a non-nullable column, getting error:
    [ENG_ID=1]com.ibm.db2.jcc.c.SqlException: PreparedStatement: set
    method setting a non-nullable input parameter 9 to null.
    .
    From JCC trace:
    [ibm][db2][jcc][SQLException@5b24c] java.sql.SQLException
    [ibm][db2][jcc][SQLException@5b24c] SQL state = null
    [ibm][db2][jcc][SQLException@5b24c] Error code = -99999
    [ibm][db2][jcc][SQLException@5b24c] Message =
    PreparedStatement: setNull method setting a non-nullable input p
    9 to null.
    .
    This was happening in the following case:
    String CONCERNED_COL= null; against OS/390 v6 db : "PreparedStat
    setNull method setting a non-nullable input parameter 9 to null"
    error returned
    String CONCERNED_COL= ""; no problem
    String CONCERNED_COL= null; against DB2/Linux V8.2 DB , no probl
    .
    The zOS concerned with which case we get the error is v7 z/OS.
    .
    This error occurs because the server is returning 'NOT NULLABLE'
    in the parameter meta-data for the concerned parameter.
    In the JCC driver, we have a check which throws Exception when
    an app uses setNull for a non-nullable parameter.
    "" (empty string) works because the value of the parameter is no
    longer null.

Local fix

Problem summary

  • COM.IBM.DB2.JCC.C.SQLEXCEPTION: PREPAREDSTATEMENT: SETNULL
    METHOD SETTING A NON-NULLABLE INPUT PARAMETER 9 TO NULL.

Problem conclusion

  • The fix is in DB2 V8.1 Fixpak 9.

Temporary fix

Comments

APAR Information

  • APAR number

    IY62616

  • Reported component name

    DB2 CEE SOLARIS

  • Reported component ID

    5765F3002

  • Reported release

    810

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2004-09-26

  • Closed date

    2009-02-24

  • Last modified date

    2009-02-24

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

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

Fix information

  • Fixed component name

    DB2 CEE SOLARIS

  • Fixed component ID

    5765F3002

Applicable component levels

  • R820 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"810","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
24 February 2009