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 the EntityManager.merge operation is applied to a class extending a mapped superclass, an exception is not thrown. For example, a testSimple() method persists a new instance of class Simple and subsequently merges another new instance of class Simple under the same id. Simple extends MapSup, which is a mapped superclass. This should fail, generating an exception similar to the following... Caused by: <openjpa-2.0.2-SNAPSHOT-r422266:1415037M fatal store error> org.apache.openjpa.persistence.EntityExistsException: FailedObject: test.ibm.Simple@4eeb4eeb at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImp l.java:2305) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2142) Instead, no exception is thrown and the merge is successful.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V8.0 and V8.5 who make use of a * * MappedSuperClass without a declared * * identity field (the derived classes * * declare an @Id field). * **************************************************************** * PROBLEM DESCRIPTION: MappedSuperClass without an @Id * * causes wrong identity type for the * * inherited types. * **************************************************************** * RECOMMENDATION: * **************************************************************** A MappedSuperClass without a declared identity field can cause the derived classes that have decalred an @Id field to incorrectly use the wrong identity type because the identity type of its superclass is unknown. This leads to the derived type to use the default identity type. As an exmaple of this case, take the following very simple MappedSuperclass: @MappedSuperclass public class MappedSuperWithoutId { private String description; public String getDesc() { return description; } public void setDesc(String desc) { this.description = desc; } } With the above MappedSuperclass, take the following JPA Entity: @Entity public class DerivedEntityFromMappedSuperWithoutId extends MappedSuperWithoutId { @Id private long id;
Problem conclusion
With this fix, code has been added to OpenJPA to properly handle an identity field declared in a derived class, rather than the mapped super class. The fix for this APAR is currently targeted for inclusion in fix packs 8.0.0.7 and 8.5.5.1. 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
PM87331
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-04-18
Closed date
2013-05-01
Last modified date
2013-05-01
APAR is sysrouted FROM one or more of the following:
PM81331
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:
11 January 2022