Getting ORA-01882: timezone region not found with Oracle UCP, on aws ec2 instance?

♀尐吖头ヾ 提交于 2019-12-21 19:41:00

问题


I am running a springboot application (which is running fine on local machine), and getting ORA-01882: timezone region not found error on ec2 instance. Its looks like a config problem but not sure how to fix it.

Stack trace is below

Caused by: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1

ORA-01882: timezone region not found

I am using ojdbc8 version 12.2.0.1


回答1:


You can pass command line argument -Duser.timezone=<Database Time Zone> to start the application.

Example:

Maven Command line: mvn springboot:run -Duser.timezone=PST

Java Command line: java -Duser.timezone=PST -jar application.jar

Here are the timezones list.

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones



来源:https://stackoverflow.com/questions/49492093/getting-ora-01882-timezone-region-not-found-with-oracle-ucp-on-aws-ec2-instanc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!