timezones known by java are not known by Oracle Database

Recently we had an issue with database connection, which led to the following eror:

ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone region not found

Finally we found out, that the timezone coming from the operating system was known to Java JDK, but not to the Oracle Database we were using.

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
PL/SQL Release 12.2.0.1.0 – Production
CORE 12.2.0.1.0 Production
TNS for Linux: Version 12.2.0.1.0 – Production
NLSRTL Version 12.2.0.1.0 – Production

These are the timezones which will lead to the issue:

Africa/Juba
America/Creston
America/Kralendijk
America/Lower_Princes
America/Metlakatla
America/North_Dakota/Beulah
America/Santarem
America/Sitka
Antarctica/Rothera
Antarctica/Vostok
Asia/Hebron
Asia/Novokuznetsk
Etc/UCT
Etc/UTC
Etc/Universal
Etc/Zulu
Europe/Busingen
Pacific/Chuuk
Pacific/Pohnpei
UCT
Universal
Zulu

 

How to solve it:

  • choose a timezone id known by Oracle database
  • set environment variable i.e. export TZ=UTC or
  • set java property -Duser.timezone=UTC

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.