IBM Support

IC65510: EXCEPTIONS ARE GETTING CHAINED TO WARNING OBJECT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • If a PreparedStatement fails to execute and throws a
    SQLException with error code -302 (SQL0302N  The value of a host
    variable in the EXECUTE or OPEN statement is out of range
    for its corresponding use) then the SQLWarning object
    returned can have a corrupted chain of warnings. Traversing the
    corrupted chain will result in the following exception :
    
    Exception in thread "main" java.lang.Error: SQLWarning chain
    holds value that is not a SQLWarning
            at java.sql.SQLWarning.getNextWarning(Unknown Source)
            at TestWarning.main(TestWarning.java:83)
    
    
    
    Example of a code that generates error  -302 :
    
    stmt.executeUpdate("create table t1 ( c1 char(4), c2 char(7))");
    stmt.executeUpdate("insert into t1 values ('ABCD','ABCDEFG')");
    
    
    PreparedStatement pstmt = con.prepareStatement("update t1 set
    c1 = ? where c2 =?");
    pstmt.setString(1, "0123");
    pstmt.setString(2, "ABCDEFGH");
    
    
    
    
    This APAR is first fixed in DB2 9.5 FP9
    

Local fix

  • N/A
    

Problem summary

  • If a PreparedStatement fails to execute and throws a
    SQLException with error code -302 then the SQLWarning object
    returned can have a corrupted chain of warnings. Traversing the
    corrupted chain will result in the following exception :
    
    Exception in thread "main" java.lang.Error: SQLWarning chain
    holds value that is not a SQLWarning
            at java.sql.SQLWarning.getNextWarning(Unknown Source)
            at TestWarning.main(TestWarning.java:83)
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC65510

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    910

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-01-13

  • Closed date

    2010-04-15

  • Last modified date

    2012-03-13

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

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

Fix information

Applicable component levels

  • R910 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
13 March 2012