A fix is available
APAR status
Closed as program error.
Error description
With null parameter values passed to EclipseLink's COALESCE() function, in JPQL, EclipseLink can incorrectly assume the JDBC type and an exception can be thrown from the JDBC driver due to incorrect type
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server - Java Persistence API - JPA 2.1 & * * EclipseLink * **************************************************************** * PROBLEM DESCRIPTION: Setting a query parameter value * * to null with Coalese() causes * * EclipseLink to throw an exception * **************************************************************** * RECOMMENDATION: * **************************************************************** Example: String jpql = "select count(1) from Employee e where e.salary = coalesce(e.salary, :sal)"; Query query = em.createQuery(jpql); query = query.setParameter("sal", null); // null parameter value Long result = (Long)query.getSingleResult(); When executing this example, EclipseLink incorrectly assumes the parameter type to be a String. If the real attribute type is Numeric, EclipseLink throws an exception when setting NULL with an invalid type.
Problem conclusion
The fix for this APAR changes the EclipseLink implementation and involves an update to the third-party source. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=469182 This fix is currently targeted for WebSphere Application Server 9.0.5.3 and WebSphere Liberty 19.0.0.11. For more information, see 'Recommended Updates for WebSphere Application Server': http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PH18844
Reported component name
WEBSPHERE APP S
Reported component ID
5724J0800
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-11-06
Closed date
2020-01-20
Last modified date
2020-01-20
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 APP S
Fixed component ID
5724J0800
Applicable component levels
R900 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
02 November 2021