Fixes are available
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
Due to a complex entity design some JPQL queries gets complex and its SQL runs xx to xxx seconds. In order to improve the performance IBM DB2support suggested passing some parameter by literal and no longer by parameter. And client changed DB2 runstats to detailed distribution statistics. Now the pure SQL shows the huge performance benefits but client do not get openjpa to execute that JPQL with Boolean constants (TRUE and FALSE). OPENJPA Version: openjpa-2.1.2-SNAPSHOT-r422266:1569528 Following following SQL to be should be generated: SELECT t0.pk, t0.code, t0.code2, t0.flag FROM MyEntity t0 WHERE (t0.flag = '1')
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 hint 'UseLiteralInSQL'. * **************************************************************** * PROBLEM DESCRIPTION: A boolean is not converted correctly * * when using the OpenJPA hint * * 'UseLiteralInSQL'. * **************************************************************** * RECOMMENDATION: * **************************************************************** The hint, 'openjpa.hint.UseLiteralInSQL', is not properly converting a boolean to an int. To illustrate this, take this entity: public class MyEntity implements Serializable { @Id private Integer pk; private boolean flag; .......... With this entity, take this test: Query q = em.createQuery("SELECT f FROM MyEntity f WHERE f.flag = true"); //false is the default: q.setHint("openjpa.hint.UseLiteralInSQL", "false"); q.getResultList(); With this code, the following SQL will be generated: SELECT t0.pk, t0.code, t0.code2, t0.flag FROM MyEntity t0 WHERE (t0.flag = ?) [params=(int) 1] Next, take this code: Query q = em.createQuery("SELECT f FROM MyEntity f WHERE f.flag = true"); q.setHint("openjpa.hint.UseLiteralInSQL", "true"); q.getResultList(); With this code, the following SQL will be generated: SELECT t0.pk, t0.code, t0.code2, t0.flag FROM MyEntity t0 WHERE (t0.flag = true) However, in the latter case where UseLiteralInSQL=true, the following SQL should be generated: SELECT t0.pk, t0.code, t0.code2, t0.flag FROM MyEntity t0 WHERE (t0.flag = '1')
Problem conclusion
With this fix, code has been added to OpenJPA to properly handle booleans when using the 'UseLiteralInSQL' property. The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 8.0.0.10, 8.5.5.5 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
PI28257
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
2014-10-23
Closed date
2015-01-30
Last modified date
2015-01-30
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