关于 java:exception 尝试从 ojdbc6.jar 升级到 ojdbc7.jar | 珊瑚贝

exception while trying to upgrade oto ojdbc7.jar from ojdb6.jar


我用 ojdb7.jar 替换了我在 tomcat/lib 中的 ojdb6.jar 文件。打开Tomcat,尝试使用时出现以下错误…

1
2
Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA00604: error occurred at recursive SQL level 1
ORA01882: timezone region not found

这是我正在使用的连接池配置….

1
2
3
4
5
6
7
8
9
10
11
<Resource auth=“Container” driverClassName=“oracle.jdbc.driver.OracleDriver” type=“javax.sql.DataSource”
    maxActive=“25” maxIdle=“25” maxWait=“2000”
    name=“jdbc/getcontacts”
    timeBetweenEvictionRunsMillis=“1000”
    minEvictableIdleTimeMillis=“30000”
    removeAbandoned=“true”
    removeAbandonedTimeout=“30000”
    logAbandoned=“true”
    username=“xxxx” password=“xxxxx”
    validationQuery=“Select 1 from dual” connectionProperties=“defaultRowPrefetch=10000”
    url=“jdbcracle:thin:@//xxxxx.net/xxxxx” />

知道是什么原因造成的吗?我们使用的是 Oracle 数据库 11g。

1
2
3
4
/usr/jdk7/bin/java version
java version“1.7.0_17”
Java(TM) SE Runtime Environment (build 1.7.0_17b02)
Java HotSpot(TM) 64Bit Server VM (build 23.7b01, mixed mode)

任何帮助将不胜感激。当我放回 ojdb6.jar 文件并删除 ojdb7.jar 文件时,一切正常。

  • stackoverflow.com/questions/9156379/…
  • 为什么投反对票?我搜索了 ojdbc7 并没有遇到这个。
  • 如果现在有人对 ojdb7 进行了类似的升级,但他们遇到了这个问题并搜索 ojdbc upgrade,那么他们会看到这篇文章,这可能会对他们有所帮助。这就是我问这个问题的背景,基本上为什么这个变化会导致这个问题。


尝试添加虚拟机参数

1
Doracle.jdbc.timezoneAsRegion=false
  • 哇,它奏效了。你天才你。你能解释一下那做了什么吗?
  • @Jose:阅读评论中链接到的帖子杰伊,解释就在那里。
  • 我用谷歌搜索并找到了关闭该功能的属性设置。我真的不能自称是天才。
  • @Nathan,这些评论都没有超过 ojdb7.jar。
  • 在 API 文档中查看此处。我不知道您使用的是哪个版本的 Oracle,所以我猜。该设置没有太大变化。下载.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javad??oc/…


来源:https://www.codenong.com/23344035/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_8871.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?