0
votes

I setup a workflow in Nifi that read from DB2 by ExecuteSQL processor and write somewhere. When I run some SQL commands that have varchar with special characters, I face the following error in ExecuteSQL processor.

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 [...]

I google this error and find that I can set the jcc configuration property db2.jcc.charsetDecoderEncoder=3. But I don't know where to set this config. I add this config in JAVA_OPTIONS system variable but not worked.

1

1 Answers

3
votes

db2.jcc.charsetDecoderEncoder=3 is an argument to the jvm that NiFi uses.

Try adding it in the bootstrap.conf file of nifi, in the group of arguments that begin with prefix java.arg. like java.arg.N=-Ddb2.jcc.charsetDecoderEncoder=3 where N is the next available higher number than existing java.arg.n lines