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:

  1. Right-click on the data source and open Properties.

  2. Go to the Advanced tab and add -Ddb2.jcc.charsetDecoderEncoder=3 in the VM Options as shown below:

  3. Apply the settings.

  4. Right-click on the data source again, navigate to Diagnostics, and select Force Refresh.

0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request