oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.sql.SQLDataException, msg=ORA-01882: timezone region not found at oracle.jbo.server.OracleSQLBuilderImpl.setSessionTimeZone(OracleSQLBuilderImpl.java:4964) ((OracleConnection) conn).setSessionTimeZone(regionName);
What goes wrong here?
Let us take a step back and see what happens when a client checks out an ApplicationModule to serve it's request. Please note that, on each checkout of an application module from the pool, that application module pool will acquire a connection from the database connection pool and would try to refresh the connection metadata to reflect the current use context. The timezone from the current locale context is set on the database connection by calling
API Doc Says:
This method is used to set the session time zone. This method must be invoked before accessing any TIMESTAMP WITH LOCAL TIME ZONE data. Upon invocation of this method, the Jdbc driver sets the session timezone of the connection and saves the session timezone so that any TSLTZ data accessed via Jdbc are adjusted using the session timezone.
This call is equivalent to ALTER SESSION SET TIME_ZONE='regionName' command on the database for a session. If the database is not able to find the regionName from V$TIMEZONE_NAMES table( SELECT * from V$TIMEZONE_NAMES ), then you may get the error that I mentioned at the beginning.
Solution is to get rid of the unsupported default timezone. You can set the timezone either using adf-config.xml or as JVM arguments.
1. Configuring using adf-config.xml
2. Passing as JVM argument
<adf-config .... <user-time-zone-config xmlns= "http://xmlns.oracle.com/adf/usertimezone/config"> <user-timezone expression= "EL exp" /> </user-time-zone-config>
Learn More ...
There are a lot more points like this. If you are curious to learn the internals of the ADF Business Components and ADF Binding Layer, the following book is for you - Oracle ADF Real World Developer’s Guide.
More details about this book can be found in this post- http://jobinesh.blogspot.in/2012/07/pre-order-your-copy-of-oracle-adf-real.html