Fixes are available
9.0.0.9: WebSphere Application Server traditional V9.0 Fix Pack 9
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
A bulk update query is expected to be able to update the version column as a parameter (JPA 2.1 Spec section 4.10), but the query parameter's value is ignored and instead a provider generated value is used.
Local fix
rename the field from "updatetimestamp" to "version", then it actually works as expected
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty - Java Persistence APA - * * JPA 2.1 & EclipseLink * **************************************************************** * PROBLEM DESCRIPTION: EclipseLink does not update the * * version column value for specific * * parameter names. This only occurs * * when executing in batch. * **************************************************************** * RECOMMENDATION: * **************************************************************** The following sample code demonstrates how an application would encounter this exception: @Entity public class TemporalVersionedEntity { @Id private long id; @Version private java.sql.Timestamp updatetimestamp; ... } Test: private final static String qStr1 = "UPDATE TemporalVersionedEntity SET updatetimestamp = ?3 " + "WHERE id = ?1 AND updatetimestamp = ?2"; em.getTransaction().begin(); final Query q = em.createQuery(qStr1); q.setParameter(1, theId); q.setParameter(2, theOldTimestamp); q.setParameter(3, new java.sql.Timestamp(System.currentTimeMillis()); final int count = q.executeUpdate(); In this test scenario, the UPDATE block that targets the version field is ignored, and instead replaces the Parameter with a Constant (generated at the time the query is generated, which then gets cached and fouls up successive executions of the same query once it gets into the query cache, too.) When this happens, the parameter passed into the query is ignored.
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/93 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
PI97945
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-05-14
Closed date
2018-08-06
Last modified date
2018-08-06
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
WEBS APP SERV N
Fixed component ID
5724H8800
Applicable component levels
R900 PSY
UP
Document Information
Modified date:
02 November 2021