Four Stars

DB2 CharConversionException

Hi,

 

Im trying to load data from a db2 to the same db2 1:1 as a simple test.

The following error appears after some time:

 

Exception in component tDB2Input_1 (talend_job)
com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][4.22.29] Excpetion java.io.CharConversionException - ERRORCODE=-4220, SQLSTATE=null
    at com.ibm.db2.jcc.am.ld.a(ld.java:794)
    at com.ibm.db2.jcc.am.ld.a(ld.java:66)
    at com.ibm.db2.jcc.am.ld.a(ld.java:125)
    at com.ibm.db2.jcc.am.mc.a(mc.java:2963)
    at com.ibm.db2.jcc.am.mc.p(mc.java:575)
    at com.ibm.db2.jcc.am.mc.P(mc.java:1656)
    at com.ibm.db2.jcc.am.ResultSet.getStringX(ResultSet.java:1214)
    at com.ibm.db2.jcc.am.ResultSet.getString(ResultSet.java:1183)
    at routines.system.JDBCUtil.getString(JDBCUtil.java:21)
    at cmm_talend_poc.talend_job_0_1.talend_job.tDB2Input_1Process(talend_job.java:3278)
    at cmm_talend_poc.talend_job_0_1.talend_job.tDB2Connection_1Process(talend_job.java:560)
    at cmm_talend_poc.talend_job_0_1.talend_job.runJobInTOS(talend_job.java:5376)
    at cmm_talend_poc.talend_job_0_1.talend_job.main(talend_job.java:5201)

    Caused by: java.nio.charset.UnmappableCharacterException: Input length = 1
    at java.nio.charset.CoderResult.throwException(CoderResult.java:282)
    at com.ibm.db2.jcc.am.r.a(r.java:52)
    at com.ibm.db2.jcc.am.mc.a(mc.java:2952)
    ... 9 more

 

The affected column contains special german characters (ä ß) as it is a comment column.

After some research i tried to use the following parameter "db2.jcc.charsetDecoderEncoder=3;" as it seem to be a DB2 driver problem - nothing changed.

Appropriate db2jcc4.jar installed (11.1.1 DB2)

 

Has anyone any ideas?

 

Greetings

Simon

 

1 ACCEPTED SOLUTION

Accepted Solutions
Employee

Re: DB2 CharConversionException

Hi Simon,

I think the parameter needs to be added as JVM parameter under Job - Advanced Settings - Job Run VM Arguments:

-Ddb2.jcc.charsetDecoderEncoder=3

db2_issue.png

 

Regards

Mathias

1 REPLY
Employee

Re: DB2 CharConversionException

Hi Simon,

I think the parameter needs to be added as JVM parameter under Job - Advanced Settings - Job Run VM Arguments:

-Ddb2.jcc.charsetDecoderEncoder=3

db2_issue.png

 

Regards

Mathias