Fixes are available
9.0.0.10: WebSphere Application Server traditional V9.0 Fix Pack 10
9.0.0.11: WebSphere Application Server traditional V9.0 Fix Pack 11
9.0.5.0: WebSphere Application Server traditional Version 9.0.5 Refresh Pack
9.0.5.1: WebSphere Application Server traditional Version 9.0.5 Fix Pack 1
9.0.5.2: WebSphere Application Server traditional Version 9.0.5 Fix Pack 2
9.0.5.3: WebSphere Application Server traditional Version 9.0.5 Fix Pack 3
APAR status
Closed as program error.
Error description
Description: Using the JPA Criteria API to construct javax.persistence.criteria.CompoundSelection objects with multiple constructor classes returns a result of 'null'. EclipseLink does not correctly use the constructor classes constructor.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty - Java Persistence APA - * * JPA 2.1 & EclipseLink * **************************************************************** * PROBLEM DESCRIPTION: EclipseLink returns a null result for * * CriteriaQuerys that contain multiple * * CompoundSelection objects * **************************************************************** * RECOMMENDATION: * **************************************************************** When constructing a CompoundSelection that references another CompoundSelection, EclipseLink does not not correctly use the class constructor. This leads the CriteriaQuery to return a null result for the sub-CompoundSelection. Example: @Test public void testCriteriaCompoundSelectionModel() { EntityManager em = emf.createEntityManager(); final CriteriaBuilder builder = em.getCriteriaBuilder(); final CriteriaQuery<L1Model> query = builder.createQuery(L1Model.class); final Root<L1> root = query.from(L1.class); final Join<L1, L2> l1ToL2 = root.join(L1_.l2); final CompoundSelection<L2Model> selection_l2 = builder.construct(L2Model.class, l1ToL2.get(L2_.id), l1ToL2.get(L2_.name)); final CompoundSelection<L1Model> selection = builder.construct(L1Model.class, root.get(L1_.id), root.get(L1_.name), selection_l2); query.select(selection); TypedQuery<L1Model> q = em.createQuery(query); List<L1Model> l1List = q.getResultList(); System.out.println("=== results ==="); if (l1List != null && !l1List.isEmpty()) { for (L1Model l1m : l1List) { System.out.println(l1m.toString()); Assert.assertNotNull(l1m.getL2()); } } em.close(); } Output: === results === L1Model [id=1, name=L1-1, l2=null] L1Model [id=2, name=L1-2, l2=null]
Problem conclusion
The fix for this APAR changes the EclipseLink implementation and involves an update to the thirdparty source. See https://github.com/eclipse-ee4j/eclipselink/issues/253 This fix is currently targeted for WebSphere Application Server 9.0.0.10 and WebSphere Liberty 18.0.0.4. 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
PH03523
Reported component name
WEBSPHERE FOR Z
Reported component ID
5655I3500
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-10-02
Closed date
2018-11-19
Last modified date
2018-11-19
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
WEBSPHERE FOR Z
Fixed component ID
5655I3500
Applicable component levels
R900 PSY
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"900","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
17 October 2021