Community
Participate
Working Groups
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.
Setting target at priority. Adrian, please feel free to recategorize.
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.
Patch looks good to me. Resteted on MySQL and MaxDB. Checked in at 9542.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink