关于db2处理特殊字段出现异常java.io.charConversionException

记录一下以前遇到的问题

在使用db2数据库处理数据的时候,碰到特殊字段,出现的问题

java.io.charConversionException

官方解决方法:

db2.jcc.charsetDecoderEncoder=3 so that instead of throwing an exception the JCC driver returns the Unicode REPLACEMENT CHARACTER (U+FFFD) in place of a sequence of bytes that is not a valid UTF-8 string

尝试方法一:

System.setProperty("db2.jcc.charsetdecoderencoder", "3");

使用jsp -v 查看环境,没有效果,还是报错

最后解决办法:

修改tomcat 文件 bin/catalina.sh  在java_opts 后面加上  -Ddb2.jcc.charsetDecoderEncoder=3

jps -v  启动参数成功生效。

错误解决

之前都没碰到过这种情况。运行一直正常。后来添加了一组数据进去。

那组数据可能是字段设置问题。产生了错误

原文地址:https://www.cnblogs.com/sunshine99/p/10729452.html

时间: 2024-10-11 18:00:28

关于db2处理特殊字段出现异常java.io.charConversionException的相关文章

socket编程报异常java.io.EOFException

一个客户端连接服务器的小程序,服务器端可以正常读取客户端发来的数据 但是当客户端关闭时,服务端也关闭了,并且抛出如下的异常: java.io.EOFException at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:323) at java.io.DataInputStream.readUTF(DataInputStream.java:572) at java.io.DataInputStream.readUTF

(https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014550004)Topic: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

270002WDPN 3 Posts 0 people like this Pinned topic                                                              Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null Nov 5, 2010                                     |                  

SqlException with message "Caught java.io.CharConversionException." and ERRORCODE=-4220

Technote (troubleshooting) Problem(Abstract) 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 mess

java.io.CharConversionException: Not an ISO 8859-1 character:

java.io.CharConversionException: Not an ISO 8859-1 character: XXX 这个问题可能是因为outputstream输出中文字造成的影响. response.setContentType("text/html;charset=UTF-8");//response.getOutputStream().print("中文字"); //这行会出错response.getWriter().print("中文

hbase异常:java.io.IOException: Unable to determine ZooKeeper ensemble

项目中用到hbase,有时候可能会报一些异常,比如java.io.IOException: Unable to determine ZooKeeper ensemble 等等,当出现这个问题时,某某说是项目中用到线程池的问题导致的,但查看异常之后,并非跟啥线程池有关系,异常信息如下: java.io.IOException: Unable to determine ZooKeeper ensemble at org.apache.hadoop.hbase.zookeeper.ZKUtil.con

hadoop异常 java.io.IOException: Job status not available

[[email protected] conf]$ hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar wordcount /user/lizeyi/people.txt  /user/lizeyi/wordcount7 15/06/08 18:36:16 INFO client.RMProxy: Connecting to ResourceManager at master.hadoop/10.3.4.35:80

tomcat 启动 证书异常java.io.IOException: Alias name [cas] does not identify a key entry

在搭建CAS server的过程中,Tomcat开启https,配置秘钥证书,证书是通过keytool生成的 <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true"

SpringBoot 上传文件到linux服务器 异常java.io.FileNotFoundException: /tmp/tomcat.50898……解决方案

SpringBoot 上传文件到linux服务器报错java.io.FileNotFoundException: /tmp/tomcat.50898-- 报错原因: 解决方法 java.io.IOException: java.io.FileNotFoundException: /tmp/tomcat.5089835798184465073.8081/work/Tomcat/localhost/ROOT/www/server/apache-tomcat-8.5.32/webapps/jxmsto

Hadoop与HBase中遇到的问题(续)java.io.IOException: Non-increasing Bloom keys异常

在使用Bulkload向HBase导入数据中, 自己编写Map与使用KeyValueSortReducer生成HFile时, 出现了下面的异常: java.io.IOException: Non-increasing Bloom keys: 201301025200000000000003520000000000000500 after 201311195100000000000000010000000000001600 at org.apache.hadoop.hbase.regionserv