CentOS环境JDBC与ORACLE DB测试连接不通,解决如下
ojdbc vs. gcj
leave a comment »
If, upon your travels, you should encounter this error:
java.lang.ClassNotFoundException: oracle.security.pki.OracleWallet
you probably want to double-check your java executable:
# java -versionjava version "1.4.2"gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you see the gcj, kill it with fire and install the Sun version (or remove the gcj-based /usr/bin/java that was ahead of your Sun executable in the $PATH):
# java -versionjava version "1.4.2_13"Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)
Then all will be well in the world again.
本文解决了在CentOS环境中使用JDBC连接Oracle数据库时出现的ClassNotFoundException问题。通过检查并替换由gcj提供的Java版本为Sun Java版本,成功解决了连接问题。
1万+

被折叠的 条评论
为什么被折叠?



