Oracle JDBC Driver BUG-4390875

项目程序遭遇Oracle JDBC Driver BUG-4390875 , 每次都得手动更新乱码字符,而且极度影响到项目的正常运行.联系Oracle官方,从Metalink得到补丁包p4390875_10204_Generic.zip.然后按照官方说明操作.最后更新到服务器的lib目录,替换旧的. 一切运行正常了.


//BUG-4390875说明:
THIN driver throw NullPointerExceoption for
OracleResultSet.getString() of invalid characters in AL32UTF8
database.

//显示异常

Caused by: java.lang.NullPointerException
at java.lang.String.<init>(String.java:176)
at oracle.sql.CharacterSet.AL32UTF8ToString(CharacterSet.java:1517)
at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:589)
at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:542)
at oracle.jdbc.driver.LongAccessor.getString(LongAccessor.java:217)
at oracle.jdbc.driver.T4CLongAccessor.getString(T4CLongAccessor.java:422)
at oracle.jdbc.driver.CharCommonAccessor.getObject(CharCommonAccessor.java:688)
at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:915)
at org.springframework.jdbc.support.JdbcUtils.getResultSetValue(JdbcUtils.java:226)




没有Metalink帐户的话,可以直接去Oracle网站下载Oracle发布的10.2.0.5 Patch Set(该包是升级Oracle Enterprise Manager的Grid Control的) 引用里面的jdbc 驱动也可以,因为Oracle官方说明这个包里也修复了那个bug.



Make sure that when using the 11g JDBC drivers you replace ojdbc14.jar with either ojdbc5.jar when using the jdk 1.5. And with ojdbc6.jar when using the jdk 1.6.

1. Download the required one-off/backport patch from MetaLink.
2. Extract this downloaded to patch to an arbitrary directory on the local system.
3. Make a note of the extracted .class file(s) in the patch, as well as the exact path to those files. Only the .class files are of interest; ignore any other files included in the extracted patch.
4. Create another temporary directory (hereafter referred to as "TEMP") -- make sure that this directory is empty.
5. Copy the old JDBC JAR file to the TEMP directory.
6. Extract the JDBC JAR file using the following syntax:
% jar xvf ojdbc14.jar
7. Replace the specific .class files in the extracted JDBC JAR file with the corresponding fixed .class files in the patch.
8. Remove the JDBC JAR file from the TEMP directory.
9. Re-JAR the JDBC JAR file using the following syntax:
% jar cvf ojdbc14.jar *
10. Copy the newly made JDBC JAR file to its original location.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值