Fixes are available
8.0.0.7: WebSphere Application Server V8.0 Fix Pack 7
8.5.5.1: WebSphere Application Server V8.5.5 Fix Pack 1
8.0.0.8: WebSphere Application Server V8.0 Fix Pack 8
8.5.5.2: WebSphere Application Server V8.5.5 Fix Pack 2
8.0.0.9: WebSphere Application Server V8.0 Fix Pack 9
8.5.5.3: WebSphere Application Server V8.5.5 Fix Pack 3
8.5.5.4: WebSphere Application Server V8.5.5 Fix Pack 4
8.0.0.10: WebSphere Application Server V8.0 Fix Pack 10
8.5.5.5: WebSphere Application Server V8.5.5 Fix Pack 5
8.5.5.6: WebSphere Application Server V8.5.5 Fix Pack 6
8.0.0.11: WebSphere Application Server V8.0 Fix Pack 11
8.5.5.7: WebSphere Application Server V8.5.5 Fix Pack 7
8.5.5.8: WebSphere Application Server V8.5.5 Fix Pack 8
8.0.0.12: WebSphere Application Server V8.0 Fix Pack 12
8.5.5.9: WebSphere Application Server V8.5.5 Fix Pack 9
8.5.5.10: WebSphere Application Server V8.5.5 Fix Pack 10
8.5.5.11: WebSphere Application Server V8.5.5 Fix Pack 11
8.0.0.13: WebSphere Application Server V8.0 Fix Pack 13
8.5.5.12: WebSphere Application Server V8.5.5 Fix Pack 12
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
APAR status
Closed as program error.
Error description
When inserting ObjectA in to a database with ObjectB attached to it, ObjectA is inserted twice resulting in a sqlstate 23505 constraint violation. The Primary Key of ObjectC is autogenerated and is used in ObjectA as the Primary Key. It is also used as part of ObjectB's Primary Key. In testing, if you use the same setup while replacing the combined Primary Key of ObjectB with a single Primary Key, the test case runs without errors.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V8.0.0, V8.5.0, and V8.5.5 who make * * use of MapsID and auto-generated identity. * **************************************************************** * PROBLEM DESCRIPTION: MapsId in a Child entity to a Parent * * entity using auto-assigned identity * * fails with duplicte INSERT SQL. * **************************************************************** * RECOMMENDATION: * **************************************************************** A MapsId annotation in entity C (child) annotates a field p of type P (parent). P uses auto-generated identity. P-C is a bidirectional parent-child relationship. During flush sequence, a row is created for P and flushed for the database to assign an identity. When C is flushed, it wrongly creates a row for P again while handling the field p that points to parent. This results in a commit which fails with a DuplicateKeyException on P's table.
Problem conclusion
With this fix, code has been added to OpenJPA to properly generate SQL when handling a Parent/Child relationship which uses MapsID and auto-generated identity. The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 8.0.0.7 and 8.5.5.1 of WebSphere Application Server versions 8.0.0 and 8.5.5. 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
PM89305
Reported component name
WEBSPHERE APP S
Reported component ID
5724J0800
Reported release
800
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-05-17
Closed date
2013-07-10
Last modified date
2013-07-22
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
R800 PSY
UP
R850 PSY
UP
Document Information
Modified date:
12 January 2022