Wednesday, April 2, 2014

Fix oracle database connecting issue due to missing time zone -java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone region not found

 

When you connect web server or application to external oracle database you need to add certain configurations. But sometimes we might get following error due to missing time zone value.

[2014-04-03 10:57:43,128] ERROR - DatabaseUtil Database Error - ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

We will be able to fix this issue by setting time zone as JVM parameter. You can add following to your java code running script.

-Duser.timezone=IST

Then issue will fix as it passes time zone.