Fixes are available
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
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.16: WebSphere Application Server V8.5.5 Fix Pack 16
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
When calling EntityManager.persist(..) OpenJPA runs SELECT statements which are unrelated to the object graph to be persisted. This problem affects the OpenJPA implementation from Feature Pack for OSGi Applications and Java Persistence API 2.0 and the implementation from WebSphere Application Server V8.5.5.1. When the TestClient is run the resulting SELECT statement is always printed: SELECT t0.test FROM OPENJPAPERSIST_REF t0 WHERE t0.id = ? [params=(long) 0] This statement should be avoided.
Local fix
na
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 a Cascade Persist and notice an * * extra SQL statement because of it. * **************************************************************** * PROBLEM DESCRIPTION: Extra queries being generated when * * cascading a persist. * **************************************************************** * RECOMMENDATION: * **************************************************************** A scenario exists where extra queries were being generated while cascading a persist to a new Entity. See the following example: @Entity public class CascadePersistEntity implements Serializable { ‚   ‚   ‚   ‚  @Id ‚   ‚   ‚   ‚  long id; ‚   ‚   ‚   ‚  @OneToOne(cascade = CascadeType.ALL) ‚   ‚   ‚   ‚  CascadePersistEntity other; ... } and the following scenario: CascadePersistEntity cpe1 = new CascadePersistEntity(1); CascadePersistEntity cpe2 = new CascadePersistEntity(2); cpe1.setOther(cpe2); em.persist(cpe1); This results in two inserts and one select. The select doesn't not cause a problem, however it is not needed since the scenario only creates two new Entities.
Problem conclusion
With this fix, code has been added to OpenJPA to remove the extra select statement when cascade persisting an Entity. The code for this APAR is enabled by a system property. The system property can be added to a persistence.xml file as follows: <property name="openjpa.Compatibility" value="CheckDatabaseForCascadePersistToDetachedEntity=false"/> Or this property can be added as a JVM system property rather than adding it to a persistence.xml file. The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 8.0.0.10 and 8.5.5.3 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
PI12737
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
850
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2014-02-28
Closed date
2014-06-20
Last modified date
2014-06-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
WEBS APP SERV N
Fixed component ID
5724H8800
Applicable component levels
R800 PSY
UP
R850 PSY
UP
Document Information
Modified date:
28 April 2022