Troubleshooting
Problem
When an application uses the IBM Data Server Driver for JDBC and SQLJ (also known as the JCC driver) and is connected to a database with code set UTF-8 (code page 1208), it throws an SqlException with message including "Caught java.io.CharConversionException" and ERRORCODE=-4220 if the data in a character column that it queries contains a sequence of bytes that is not a valid UTF-8 string.
Symptom
An exception is thrown similar to this:
com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][XXX.XXX.XXX] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
[...]
Caused by: java.nio.charset.MalformedInputException: Input length = XXX
[...]
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:XXX)
[...]
To view more of this document
Was this topic helpful?
Document Information
More support for:
Db2 for Linux, UNIX and Windows
Software version:
9.7, 9.5, 10.1, 10.5, 11.1
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows
Document number:
250689
Modified date:
30 April 2025
UID
swg21684365