问题描述
我正在从Java应用程序访问Oracle数据库,当我运行应用程序时出现以下错误:
I'm accessing an Oracle Database from a java application, when I run my application I get the following error:
推荐答案
您也可以尝试检查Oracle jdbc驱动程序和Oracle数据库的版本.就在今天,当我使用ojdbc6.jar(版本11.2.0.3.0)连接到Oracle 9.2.0.4.0服务器时遇到了这个问题.替换为ojdbc6.jar 11.1.0.7.0版即可解决此问题.
You may also try to check the version of the Oracle jdbc driver and Oracle database. Just today I had this issue when using ojdbc6.jar (version 11.2.0.3.0) to connect to an Oracle 9.2.0.4.0 server. Replacing it with ojdbc6.jar version 11.1.0.7.0 solved the issue.
通过在文件oracle/jdbc/defaultConnectionProperties.properties中(在jar内)添加oracle.jdbc.timezoneAsRegion=false
,我还设法使ojdbc6.jar版本11.2.0.3.0正确连接.在此处
I also managed to make ojdbc6.jar version 11.2.0.3.0 connect without error, by adding oracle.jdbc.timezoneAsRegion=false
in file oracle/jdbc/defaultConnectionProperties.properties (inside the jar). Found this solution here
最后,可以将-Doracle.jdbc.timezoneAsRegion=false
添加到命令行,或在使用该符号的配置文件中添加-Doracle.jdbc.timezoneAsRegion=false
Lastly, one can add -Doracle.jdbc.timezoneAsRegion=false
to the command line, or AddVMOption -Doracle.jdbc.timezoneAsRegion=false
in config files that use this notation
这篇关于ORA-01882:找不到时区区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!