Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334808 - Test PersistenceTestGreaterThanEqualDate fails on MaxDB
Summary: Test PersistenceTestGreaterThanEqualDate fails on MaxDB
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: maxdb submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 11:23 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:21 EDT (History)
5 users (show)

See Also:


Attachments
proposed patch for bug 334808 (1.46 KB, patch)
2011-06-01 11:39 EDT, Konstantin Schwed CLA
adrian.goerler: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Goerler CLA 2011-01-19 11:23:18 EST

    
Comment 1 Adrian Goerler CLA 2011-01-19 11:26:28 EST
The test PersistenceTestGreaterThanEqualDate fails on MaxDB with the following exception:

Internal Exception: com.sap.dbtech.jdbc.exceptions.jdbc40.SQLDataException: [-3048] (at 226): Invalid date format:ISO Error Code: -3048 Call: SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.GENDER, t0.L_NAME, t1.SALARY, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE ((t0.START_DATE >= {ts '2001-07-01 11:24:36.982'}) AND (t1.EMP_ID = t0.EMP_ID)) Query: ReadObjectQuery(name="PersistenceTestGreaterThanEqualDate" referenceClass=Employee sql="SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.GENDER, t0.L_NAME, t1.SALARY, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE ((t0.START_DATE >= {ts '2001-07-01 11:24:36.982'}) AND (t1.EMP_ID = t0.EMP_ID))") 

Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.sap.dbtech.jdbc.exceptions.jdbc40.SQLDataException: [-3048] (at 226): Invalid date format:ISO
Error Code: -3048
The column START_DATE is a DATE column. Likely, the comparison with the timestamp literal is rejected.
Comment 2 Tom Ware CLA 2011-02-03 09:51:30 EST
Setting target at priority.  Adrian, please feel free to recategorize.
Comment 3 Konstantin Schwed CLA 2011-06-01 11:39:54 EDT
Created attachment 197105 [details]
proposed patch for bug 334808

The test used an instance of GregorianCalendar and compared it to the employee.period.startDate, which has a Java type java.sql.Date. This caused problems on MaxDB which refused to treat a timestamp literal as a legal comparison value for a date. 

With the proposed patch an instance of java.sql.Date is used instead of GregorianCalendar. This fixes the test on MaxDB and doesn't lead to regression with MySQL.
Comment 4 Adrian Goerler CLA 2011-06-08 04:13:14 EDT
Patch looks good to me.

Resteted on MySQL and MaxDB.

Checked in at 9542.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:21:48 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink