问题
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