IBM DB2 introspection fails with java.io.CharConversionException, ERRORCODE=-4220
Issue
IBM DB2 introspection fails with an exception similar to the following:
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)
[...]
Solution
According to SqlException with message "Caught java.io.CharConversionException." article, the issue may be caused by attempting to load a string value that does not conform to UTF-8 encoding.
To resolve this issue:
-
Right-click on the data source and open Properties.
-
Go to the Advanced tab and add -Ddb2.jcc.charsetDecoderEncoder=3 in the VM Options as shown below:

-
Apply the settings.
-
Right-click on the data source again, navigate to Diagnostics, and select Force Refresh.
Please sign in to leave a comment.