英文:
Required character converter is not available. ERRORCODE=-4220, SQLSTATE=null
问题
迁移到Java 8的应用程序之前在Java 7上运行。迁移后,我不得不将db2jcc.jar更新到最新版本,但仍然遇到以下错误:
所需的字符转换器不可用。错误代码=-4220,SQL状态=null
我已经检查过并尝试了这个主题:https://stackoverflow.com/questions/16910791/getting-error-code-4220-with-null-sql-state
我的数据库版本:DB2 v10.5.0.11
我使用的db2 Jar:db2jcc-9.5.jar
有人之前遇到过类似情况吗?
问候
英文:
The application I migrate to Java8 was running on Java7. After the migration i had to update the db2jcc.jar to latest version and yet I have the error below:
Required character converter is not available. ERRORCODE=-4220, SQLSTATE=null
I have checked and tried the topic https://stackoverflow.com/questions/16910791/getting-error-code-4220-with-null-sql-state
My DB version : DB2 v10.5.0.11
The db2 Jar I use : db2jcc-9.5.jar
Has anyone faced this before?
Regards
答案1
得分: 2
我的数据库版本:DB2 v10.5.0.11
我使用的db2 Jar包:db2jcc-9.5.jar
异常信息中包含:
[Camel Thread #2 - JmsConsumer[null]] WARN **** - SQLException:com.ibm.db2.jcc.a.SqlException:
[jcc][t4][10199][10462][3.52.95] 所需的字符转换器不可用。ERRORCODE=-4220,SQLSTATE=null
请注意,异常信息中包含了db2 jdbc驱动程序版本[3.52.95]
。这是一个旧的驱动程序,随着db2版本9.5 fixpack2a一起提供,已经不再支持。
您需要使用适用于Db2的最新的Type 4 jdbc驱动程序,而且db2 jdbc驱动程序的版本将在异常信息中显示为一个由点分隔的三部分数字。
对于Db2-LUW v10.5,目前可用的db2 Type 4 jdbc驱动程序版本为4.19.80
,虽然您也可以使用更高版本。
您可以从IBM的这个网站下载最新的jdbc驱动程序版本,您需要首先在IBM注册,尽管下载是免费的。
英文:
Your question included
My DB version : DB2 v10.5.0.11
The db2 Jar I use : db2jcc-9.5.jar
The exception text included:
[Camel Thread #2 - JmsConsumer[null]] WARN **** - SQLException: com.ibm.db2.jcc.a.SqlException:
[jcc][t4][10199][10462][3.52.95] Required character converter is not available. ERRORCODE=-4220, SQLSTATE=null
Notice the db2 jdbc driver version, [3.52.95]
included in the exception text.
This is an old driver that comes with db2 version 9.5 fixpack2a, long out of support.
You need to be using a recent type 4 jdbc driver for Db2, and the version of the db2 jdbc driver will appear in the exception text as a three part number with a dot separating the parts.
For Db2-LUW v10.5 the currently available version of the db2 type 4 jdbc driver is 4.19.80
although you can use higher versions.
You can download the recent jdbc driver versions from this IBM website, you will need to register with IBM first, although the download is free.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论