Fixes are available
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12
21.0.0.3: WebSphere Application Server Liberty 21.0.0.3
21.0.0.4: WebSphere Application Server Liberty 21.0.0.4
21.0.0.5: WebSphere Application Server Liberty 21.0.0.5
21.0.0.6: WebSphere Application Server Liberty 21.0.0.6
21.0.0.7: WebSphere Application Server Liberty 21.0.0.7
21.0.0.8: WebSphere Application Server Liberty 21.0.0.8
21.0.0.9: WebSphere Application Server Liberty 21.0.0.9
21.0.0.1: WebSphere Application Server Liberty 21.0.0.1
21.0.0.2: WebSphere Application Server Liberty 21.0.0.2
21.0.0.10: WebSphere Application Server Liberty 21.0.0.10
21.0.0.11: WebSphere Application Server Liberty 21.0.0.11
21.0.0.12: WebSphere Application Server Liberty 21.0.0.12
22.0.0.1: WebSphere Application Server Liberty 22.0.0.1
22.0.0.2: WebSphere Application Server Liberty 22.0.0.2
22.0.0.3: WebSphere Application Server Liberty 22.0.0.3
22.0.0.4: WebSphere Application Server Liberty 22.0.0.4
APAR status
Closed as program error.
Error description
The JPA persistence provider EclipseLink generates incorrect SQL for JPQL statements containing 'IN' expressions
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty - Java Persistence API * * (JPA) * **************************************************************** * PROBLEM DESCRIPTION: EclipseLink generates incorrect SQL * * statements for JPQL that contains * * aliases in an IN clause * **************************************************************** * RECOMMENDATION: * **************************************************************** Here are some examples of JPQL that result in incorrect SQL statements. //JPQL Query #1: Query q = em.createQuery("select t0.id from SomeEntity t0 where (t0.someString1, t0.someString2) in (select t1.someString1, t1.someString1 from SomeEntity t1)"); //Generated statement: //SELECT t0.value1, t0.value2 FROM parentTable t0 WHERE (parentTable.someString1, parentTable.someString2) IN (SELECT t1.someString1, t1.someString1 FROM parentTable t1) Issue: This generated statement is invalid here because as you can see, the aliases were not correctly generated. This leads to an exception upon execution. //JPQL Query #2: Query q = em.createQuery("select t0.id from SomeEntity t0 where (t0.otherEntity.otherString1, t0.someString1) in (select t1.someString1, t1.someString2 from SomeEntity t1)"); //Generated statement: //SELECT t0.value1, t0.value2 FROM parentTable t0, parentTable t2, otherTable t1 WHERE ((t1.otherString1, t2.someString1) IN (SELECT t3.someString1, t3.someString2 FROM parentTable t3) AND ((t1.value2 = t2.fkOtherValue2) AND (t1.value1 = t2.fkOtherValue1))) Issue: This generated statement is invalid since 't0' is not referenced within the generated query. Instead, EclipseLink seems to use this 'otherTable' reference.
Problem conclusion
The fix for this APAR changes the EclipseLink implementation and involves an update to the thirdparty source. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=531062 The fix for this APAR is currently targeted for inclusion in Service Level (Fix Pack) 9.0.0.9 of WebSphere Application Server version 9.0 and in fix pack 18.0.0.2 for WebSphere Application Server Liberty. 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
PI94027
Reported component name
WAS LIBERTY COR
Reported component ID
5725L2900
Reported release
855
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-02-21
Closed date
2018-05-08
Last modified date
2018-05-08
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
WAS LIBERTY COR
Fixed component ID
5725L2900
Applicable component levels
R855 PSY
UP
Document Information
Modified date:
03 May 2022