Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370435 - SQLException: Timezone not supported for Oracle 11g with time zone 'America/Toronto'
Summary: SQLException: Timezone not supported for Oracle 11g with time zone 'America/T...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: oracle
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 09:07 EST by Zacharia Kunju CLA
Modified: 2022-06-09 10:33 EDT (History)
2 users (show)

See Also:


Attachments
Test clients and related files (5.51 KB, application/zip)
2012-02-02 09:10 EST, Zacharia Kunju CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zacharia Kunju CLA 2012-02-02 09:07:37 EST
Build Identifier: 2.1.3.v20110304-r9073

While trying to access a column with "TIME STAMP WITH LOCAL TIME ZONE" from a database of following version and a DBTIMEZONE of 'America/Toronto', i am getting exceptions which says 'TimeZone not supported".


-Test Client attached 'SampleELClient.java', which simply queries a table having a column of type "TIME STAMP WITH LOCAL TIME ZONE"
-Also attached ELBugDemo.java which demonstrate code from "org.eclipse.persistence.platform.database.oracle.Oracle9Platform" is leading into this exception
-Other attachments to run the samples are README, TestEntity.java, Constants.java, persistence.xml are also attached
-Dependant JAR files are not attached


An excerpt from the Exception stack, details attached in "Exceptions.txt"
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Timezone not supported
Error Code: 0
Call: SELECT * FROM TestEntity
Query: DataReadQuery(sql="SELECT * FROM TestEntity")
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1164)

--------------------
Software versions:
--------------------
Database:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

JDBC Driver: Tried on all versions even though currently we are using classes12.jar

Oracle JDBC driver  Version: 9.0.1.4.0   (classes12.jar)
Oracle JDBC driver  Version: 10.2.0.1.0XE (ojdbc14.jar)
Oracle JDBC driver  Version: 11.2.0.2.0   (ojdbc6.jar)


Eclipselink version:
Eclipse Persistence Services - 2.1.3.v20110304-r9073


===========================
Observations:
===========================
1. I can see Oracle DB added 'America/Toronto' in version 7 of timezone file

Version 7
---------
Timezones added:
America/Toronto
America/Atikokan
America/Blanc-Sablon
America/Campo_Grande
America/Danmarkshavn
Australia/Currie

2. Details of the database i am using

SQL> SELECT version FROM v$timezone_file;

   VERSION
----------
        11

3. Client is using Java 1.6.0_20-b02
4. Any database with a timezone format in UTC offset is working without any error

Reproducible: Always

Steps to Reproduce:
1. Make sure the DB timezone is 'America/Toronto'  
  SQL> select dbtimezone from dual;
			DBTIMEZONE
			---------------
			America/Toronto
			
2. Run SQL   
create table TestEntity (name varchar(20), jdate timestamp(6) with local time zone);
3. INSERT INTO TestEntity  VALUES ('zach', TIMESTAMP '2012-02-02 12:23:45'); 
   commit;
4. Modify the Constants.java to update your DB details
5. Run SampleELClient.class to view the exceptions
5. Optionally run ELBugDemo.class (Also refer to the method level comments i put)
Comment 1 Zacharia Kunju CLA 2012-02-02 09:10:57 EST
Created attachment 210445 [details]
Test clients and related files

-Samples attached SampleELClient.java, which simply queries a table having a column of type "TIME STAMP WITH LOCAL TIME ZONE"
-Also attached ELBugDemo.java which demonstrate code from "org.eclipse.persistence.platform.database.oracle.Oracle9Platform" is leading into this exception
-Other attachments to run the samples are README, TestEntity.java, Constants.java, persistence.xml are also attached
-Dependant JAR files are not attached
Comment 2 Tom Ware CLA 2012-02-17 10:44:10 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:33:22 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink