APAR status
Closed as program error.
Error description
JPQL not processing HAVING clause properly
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All users of the Java Persistence API 2.0 * * feature of the IBM ‚ ® WebSphere ‚ ® Applicat * Server V7 Feature Pack for OSGi * * Applications and Java Persistence API 2.0 * * who make use of the the * * HAVING clause in a Java Persistence Query * * Language (JPQL) query. * * * **************************************************************** * PROBLEM DESCRIPTION: The HAVING clause in a JPQL query is * * not properly handled. * **************************************************************** * RECOMMENDATION: * **************************************************************** Take as an example, but not limited to, the following JPQL string: select m.idPublisher, max(m.datePublished) from Magazine m group by m.idPublisher having max(m.datePublished) is null This will result in the following exception: <openjpa-1.3.0-SNAPSHOT-runknown nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Encountered "max ( m . datePublished ) is" at character 90, but expected: ["(", ")", "*", "+", "-", ".", "/", ":", "<", "<=", "<>", "=", ">", ">=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>]. at org.apache.openjpa.kernel.jpql.JPQL.generateParseException(JPQL. java:9501) at org.apache.openjpa.kernel.jpql.JPQL.jj_consume_token(JPQL.java:9 378) ... This occures because the 'having' clause is not properly handled by the OpenJPA code.
Problem conclusion
With this fix code has been added to properly process the 'HAVING' clause in a JPQL query. The fix for this APAR is currently targeted for inclusion in Fix Pack 1.0.0.3 for Feature Pack for OSGi Applications and Java Persistence API 2.0. Please refer to the recommended updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM23613
Reported component name
JPA OSGI FEATUR
Reported component ID
5724J0857
Reported release
700
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-09-30
Closed date
2010-10-22
Last modified date
2010-10-22
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
JPA OSGI FEATUR
Fixed component ID
5724J0857
Applicable component levels
R700 PSY
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
29 September 2020