DB2 - Problem description
Problem IC69458 | Status: Closed |
JCC DRIVER HANGS IN INFINITE LOOP | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem 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)); | |
Problem Summary: | |
See ERROR DESCRIPTION. | |
Local Fix: | |
Use PreparedStatement.setCharacterStream(int, Read, length) or PreparedStatement.getCharacterStream(int, Read, length) which specifies the length of the data. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
First fixed with JDBC driver included with v9.5 Fixpack 7. This is a client side fix. | |
Workaround | |
See LOCAL FIX. | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.06.2010 24.02.2012 24.02.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP7 | |
Problem solved according to the fixlist(s) of the following version(s) |