Fixes are available
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.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
An entity uses an embeded primary key composed by two fields. On the first call to the entityManager by using the "find" (by primary key) method, OpenJPA will build the jpql request. If one of the two fields of the embeded primary key is null, OpenJPA will replace this by "IS NULL" in the generated jpql string. This generated jpql request is put in a finder cache. On subsequent calls, OpenJPA will retreive the generated jpql from cache. However, if the field that was null in the embedded key is now correctly filled in, OpenJPA will not try to recompute the jpql, but will try to set the parameter in the jdbc preparedStatement. This will raise an exception.
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 the OpenJPA FinderCache. * **************************************************************** * PROBLEM DESCRIPTION: OpenJPA FinderCache contains * * incorrectly cached query with a NULL * * for a Primary Key. * **************************************************************** * RECOMMENDATION: * **************************************************************** Take the following SQL from a finder: SELECT t1.code, t1.EXTDISCR, t0.field1, t0.field2 FROM TB1 t0 LEFT OUTER JOIN AbstractExtValue t1 ON t0.EXT_USR = t1.code WHERE (t1.EXTDISCR IS NULL OR t1.EXTDISCR IN ?) AND t0.field1 = ? AND t0.field2 IS NULL Notice the 't0.field2 IS NULL' part. Field2 is part of a compound PK of table 'TB1', where the compound PK consists of two fields (field1 and field2). Because the PK field 'IS NULL', this finder query should NOT be added to the OpenJPA FinderQuery cache (i.e. OpenJPA can't cache something which is "hard coded" to 'IS NULL'....in the case where field2 is non-null, the query will never account for that). However, this query is in fact incorrectly added to the cache. Because the query is cached with 'IS NULL' for field2, any time this query is run field2 can never be changed to a non-null value.
Problem conclusion
With this fix, code has been added to OpenJPA to avoid caching a query in the FinderCache which contains a hard coded value as one of the parameters. The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 8.0.0.11 and 8.5.5.6 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
PI32689
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
800
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-01-14
Closed date
2015-04-14
Last modified date
2015-04-14
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:
27 April 2022