APAR status
Closed as program error.
Error description
Executing the same JPA UPDATE query multiple times will result in invalid Timestamp @Version values being updated in the database. Clearing query caches and changing entitymanagers are not a work around in this case.
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server - Java Persistence API - JPA 2.1 & * * EclipseLink * **************************************************************** * PROBLEM DESCRIPTION: When creating UPDATE queries for * * entities that contain Timestamp * * version locking, EclipseLink reuses * * the same Timestamp values * **************************************************************** * RECOMMENDATION: * **************************************************************** When EclipseLink executes UPDATE queries multiple times, the Timestamp version value will appear unchanged even though it is a new UPDATE query being executed. This applies to NamedQuerys, JPQL queries, and Criteria queries. Example trace: ``` [EL Finest]: query: 2022-01-18 10:37:10.895--UnitOfWork(443713699)-- Thread(Thread[main,5,main]) --Execute query UpdateAllQuery(referenceClass=EcallRegistration sql="UPDATE ECALLREGISTRATION SET ECALLAVAILABLEFLAG = ?, sys_update_timestamp = ?") [EL Fine]: sql: 2022-01-18 10:37:10.895--ClientSession(1563053805)--Connection(1082411691)- -Thread(Thread[main,5,main])--UPDATE ECALLREGISTRATION SET ECALLAVAILABLEFLAG = ?, sys_update_timestamp = ? bind => [0, 2022-01-18 10:37:10.685445] ... [EL Finest]: query: 2022-01-18 10:37:20.915--UnitOfWork(1356236848)-- Thread(Thread[main,5,main] )--Execute query UpdateAllQuery(referenceClass=EcallRegistration sql="UPDATE ECALLREGISTRATION SET ECALLAVAILABLEFLAG = ?, sys_update_timestamp = ?") [EL Fine]: sql: 2022-01-18 10:37:20.915--ClientSession(1822630059)--Connection(1082411691)- -Thread(Thread[main,5,main])--UPDATE ECALLREGISTRATION SET ECALLAVAILABLEFLAG = ?, sys_update_timestamp = ? bind => [1, 2022-01-18 10:37:10.685445] ``` Notice that the same `sys_update_timestamp` value is used even though the trace timestamp shows that this is a future execution of the UPDATE query.
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=578262 This fix is currently targeted for WebSphere Application Server 9.0.5.13 and WebSphere Liberty 22.0.0.6. For more information, see 'Recommended Updates for WebSphere Application Server': https://www.ibm.com/support/pages/node/715553
Temporary fix
Comments
APAR Information
APAR number
PH43934
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
2022-02-08
Closed date
2022-08-05
Last modified date
2022-08-05
APAR is sysrouted FROM one or more of the following:
PH43490
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
[{"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:
06 August 2022