Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324128 - hundreds jpa oracle specific TimeStamp related WriteTypeObjectTests failed on oracle 10.2.0.4
Summary: hundreds jpa oracle specific TimeStamp related WriteTypeObjectTests failed on...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andrei Ilitchev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 15:59 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:08 EDT (History)
2 users (show)

See Also:


Attachments
suggested patch. (4.41 KB, patch)
2010-09-01 10:38 EDT, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2010-08-31 15:59:38 EDT
Lots of jpa oracle specific tests failed on oracle 10.2.0.4 since revision 8074, I have verified that the tests passed with previous revision 8072, it seems that the changes Andrei made on Aug 23rd as fix of bug 323420 caused the regression.

The typical failed test and error:

org.eclipse.persistence.testing.tests.types.WriteTypeObjectTest.WriteTypeObjectTest(class org.eclipse.persistence.testing.tests.types.TIMESTAMPDirectToFieldTester)

Exception Description: calToTSTZ.compareTo(fromDatabase.getCalToTSTZ()) == -1 original calToTSTZ = 1900-01-01 00:00:00.0 GMT fromDatabase.calToTSTZ = java.util.GregorianCalendar[time=-2208970800000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=3600000,useDaylight=true,transitions=149,lastRule=java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1900,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-18000000,DST_OFFSET=0] Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.testing.framework.TestErrorException Exception Description: The object inserted into the database, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT' does not match the original, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT'. 

Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.testing.framework.TestErrorException
Exception Description: 
calToTSTZ.compareTo(fromDatabase.getCalToTSTZ()) == -1
original calToTSTZ = 1900-01-01 00:00:00.0 GMT
fromDatabase.calToTSTZ = java.util.GregorianCalendar[time=-2208970800000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=3600000,useDaylight=true,transitions=149,lastRule=java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1900,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-18000000,DST_OFFSET=0]

Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.testing.framework.TestErrorException
Exception Description: The object inserted into the database, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT' does not match the original, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT'.
at org.eclipse.persistence.testing.tests.types.TIMESTAMPTester.verify(TIMESTAMPTester.java:502)
at org.eclipse.persistence.testing.tests.types.WriteTypeObjectTest.verify(WriteTypeObjectTest.java:80)
at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:157)
at org.eclipse.persistence.testing.framework.TestCase.runBare(TestCase.java:265)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248)
at org.eclipse.persistence.testing.framework.TestSuite.execute(TestSuite.java:75)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.testing.framework.TestErrorException
Exception Description: The object inserted into the database, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT' does not match the original, 'ZERO 1 -> 1900-01-01 00:00:00.0 GMT'.
at org.eclipse.persistence.testing.framework.WriteObjectTest.verify(WriteObjectTest.java:268)
at org.eclipse.persistence.testing.tests.types.WriteTypeObjectTest.superVerify(WriteTypeObjectTest.java:64)
at org.eclipse.persistence.testing.tests.types.TypeTester.verify(TypeTester.java:79)
at org.eclipse.persistence.testing.tests.types.TIMESTAMPTester.verify(TIMESTAMPTester.java:377)
Comment 1 Andrei Ilitchev CLA 2010-09-01 10:38:42 EDT
Created attachment 177961 [details]
suggested patch.

This is a test issue.
In bug 323420 I simplified in TIMESTAMPTester verification check for calToTSLTZ 
(calendar written into TIMESTAMPTZ, then read back should be the same).
That worked when Timestamp obtained from TIMESTAMPTZ is in GMT (11.1.0.7 and later); but didn't work otherwise.
Now the test checks isTimestampInGmt and uses the new approach if it is, and the old approach otherwise.
Comment 2 Andrei Ilitchev CLA 2010-09-01 10:44:13 EDT
Checked the patch into trunk, 2.1.2 is pending.
Comment 3 Andrei Ilitchev CLA 2010-09-01 11:08:14 EDT
Checked the patch into 2.1.2.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:08:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink