f



Get "SQLException: Session Time Zone not set!" from WebLogic to WebSphere

I have an app that runs in WebLogic 8.1.4, using Spring, Hibernate,
and Oracle 9i.  Some of my tables use "TIMESTAMP WITH LOCAL TIME ZONE"
columns.  This app basically works.

I'm now porting portions of this to WebSphere 6.0.2.5. My JDBC
provider class is oracle.jdbc.pool.OracleConnectionPoolDataSource.

Now, when I run the app, I get an exception like this:

Caused by: java.sql.SQLException: Session Time Zone not set!
	at
oracle.jdbc.driver.TimestampltzAccessor.getTimestamp(TimestampltzAccessor.java:
288)
	at
oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:
731)
	at
oracle.jdbc.driver.OracleResultSet.getTimestamp(OracleResultSet.java:
1702)
	at
com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getTimestamp(WSJdbcResultSet.java:
2004)
	at org.hibernate.type.TimestampType.get(TimestampType.java:30)

Googling this exception tells me that I need to call
"OracleConnection.setSessionTimeZone(String regionName)" on my
connection. Obviously, I didn't have to do this when the app was
running in WebLogic. Is this something that's transparently taken care
of in the infrastructure that WebLogic is using, which WebSphere is
not doing?  If so, what's the best way to fix this problem?  Note that
by using Hibernate, I'm not explicitly getting a database connection.

0
david
7/11/2007 12:14:33 AM
comp.lang.java.databases 3049 articles. 0 followers. samyaksulabh (16) is leader. Post Follow

0 Replies
476 Views

Similar Articles

[PageSpeed] 11

Reply: