Community
Participate
Working Groups
Build Identifier: Eclipse Persistence Services - 2.3.2.v20111125-r10461 The attached tests contain a case that is similar to http://en.wikipedia.org/wiki/Java_Persistence_Query_Language#Examples that shows a JPQL query as follows: like SELECT a FROM Author a WHERE :lastName IS NULL OR LOWER(a.lastName) = :lastName EclipseLink crashes in case where the parameter value is actually null: Call: SELECT ID, NAME, region_id FROM CUSTOMERORDER WHERE ((? IS NULL) OR (region_id = ?)) bind => [null, null] ... Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Reproducible: Always Steps to Reproduce: Please refer to the attached maven test cases. These contain criteria queries that require a JVM argument -javaagent:"C:\Documents and Settings\name\.m2\repository\org\eclipse\persistence\eclipselink\2.3.2\eclipselink-2.3.2.jar" Please feel free to remove the criteria queries as they are not needed for this issue.
Created attachment 214502 [details] EclipseLink Postgresql Maven test case in zip file
Created attachment 214503 [details] EclipseLink HSQL Maven test case in zip file This test case is configured for the HSQL Hypersonic database. Works fine.
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.
Seems to work in 2.4.0 2.4.0 has a new very similar issue 387545: NamedQuery with null Parameter fails at Runtime with Postgresql
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink