IBM Support

IC69344: JCC DRIVER HANGS IN INFINITE LOOP

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • An application using the JDBC/JCC driver will hang when calling
    the streaming methods:
    
    PreparedStatement.getCharacterStream(int, Reader)
    OR
    PreparedStatement.setCharacterStream(int, Reader, -1)
    
    A javacore from the hanging application may be similar to the
    function stack below:
    
    java.lang.Thread.State: RUNNABLE
    at
    java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
    at com.ibm.db2.jcc.t4.ib.a(ib.java:257)
    at com.ibm.db2.jcc.t4.lb.a(lb.java:1635)
    at com.ibm.db2.jcc.t4.lb.a(lb.java:181)
    at com.ibm.db2.jcc.t4.vb.a(vb.java:175)
    
    This issue is not affected by CPU load and occurs when streaming
    is used for large CLOBs.  For example if MY_DATA was a string
    longer than 16,390 characters this issue can be easily
    reproduced.
    
    private static String MY_DATA;
    
    PreparedStatement.setCharacterStream(2, new
    StringReader(MY_DATA));
    

Local fix

  • Use PreparedStatement.setCharacterStream(int, Read, length) or
    PreparedStatement.getCharacterStream(int, Read, length) which
    specifies the length of the data.
    

Problem summary

  • See ERROR DESCRIPTION.
    

Problem conclusion

  • At minimum Java application should upgrade to the JDBC/JCC
    driver included with v9.7 Fixpack 3.
    

Temporary fix

  • See LOCAL FIX.
    

Comments

APAR Information

  • APAR number

    IC69344

  • 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

    2010-06-18

  • Closed date

    2010-10-04

  • Last modified date

    2011-07-25

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

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

    IC69458

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R820 PSN

       UP

  • R910 PSN

       UP

  • R950 PSN

       UP

  • R970 PSN

       UP

  • R980 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC69344

Modified date: 25 July 2011