Java没有使用正确的时区

Java没有使用正确的时区,java,timezone,weblogic,Java,Timezone,Weblogic,我的公司在Oracle WebLogic服务器上部署了一个web应用程序。我们正在努力升级到WebLogic12c,并将应用程序从Java1.5升级到1.7.015 启动应用程序服务器时,出现以下错误: <Jun 6, 2017 12:09:31 PM EDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "SIMPLeBDataSource" d

我的公司在Oracle WebLogic服务器上部署了一个web应用程序。我们正在努力升级到WebLogic12c,并将应用程序从Java1.5升级到1.7.015

启动应用程序服务器时,出现以下错误:

<Jun 6, 2017 12:09:31 PM EDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "SIMPLeBDataSource" due to error weblogic.application.ModuleException: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection for datasource 'SIMPLeBDataSource'. The DBMS driver exception was: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

weblogic.application.ModuleException: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection for datasource 'SIMPLeBDataSource'. The DBMS driver exception was: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

        at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:350)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
        at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:175)
        at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:170)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
        Truncated. see log file for complete stacktrace
Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection for datasource 'SIMPLeBDataSource'. The DBMS driver exception was: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

        at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:360)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1320)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1237)
        at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:240)
        at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1624)
        Truncated. see log file for complete stacktrace
>

我们发现,在服务器启动参数中添加
-Duser.timezone='Canada/Eastern'
可以解决这个问题。但是,服务器日志和log4j日志没有记录正确的时间戳;他们落后了一个小时

我添加了
TimeZone localTimeZone=TimeZone.getDefault()
到代码,并记录localTimeZone.toString()和get
sun.util.calendar.ZoneInfo[id=“GMT-05:00”,偏移量=-18000000,DSTSAVAINGS=0,useDaylight=false,transitions=0,lastRule=null]


东部标准时间是GMT-5,我们目前使用的是夏令时,这使得它是GMT-4,所以它似乎使用了指定的java启动参数,但没有意识到它应该在DST中。有没有办法在启动参数中指定DST?

设置
用户。时区
是正确的程序。如果仍然不起作用,请尝试升级到最新的jdk,比如jdk 7 update 131或141。如果这不是一个选项,请尝试“时区更新工具”。您可以在此处找到更多详细信息:

无法使用时区更新工具修复此问题,因为它需要internet连接,而此框没有internet连接。至于JDK更新,我对如何获得更新141有点困惑,因为它不是公开的。我认为下载该工具然后复制它是一种选择,但我以前从未尝试过。如果您有权访问Oracle的支持站点,则可以使用更新141。