Fixes are available
8.0.0.2: WebSphere Application Server V8.0 Fix Pack 2
8.0.0.3: WebSphere Application Server V8.0 Fix Pack 3
8.0.0.4: WebSphere Application Server V8.0 Fix Pack 4
8.0.0.5: WebSphere Application Server V8.0 Fix Pack 5
8.0.0.6: WebSphere Application Server V8.0 Fix Pack 6
8.0.0.7: WebSphere Application Server V8.0 Fix Pack 7
8.0.0.8: WebSphere Application Server V8.0 Fix Pack 8
8.0.0.9: WebSphere Application Server V8.0 Fix Pack 9
8.0.0.10: WebSphere Application Server V8.0 Fix Pack 10
8.0.0.11: WebSphere Application Server V8.0 Fix Pack 11
8.0.0.12: WebSphere Application Server V8.0 Fix Pack 12
8.0.0.13: WebSphere Application Server V8.0 Fix Pack 13
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
APAR status
Closed as program error.
Error description
User is seeing an exception similar to the following when running a query, where the query is defined in a mapping file (orm.xml): Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00904: "T0"."MYSTATUS_OID": invalid identifier {prepstmnt 559489369 SELECT t0.OID, t0.version FROM MY_TABLE t0, MY_OTHER_TABLE t1 WHERE t0.MYSTATUS_OID = t1.ID The MYSTASUS_OID column doesn't exist in the user's database, so the exception is correct, however, the correct column name which OpenJPA should be looking for is MY_STATUS_OID. In this case OpenJPA is using the wrong column name. A couple things to note: 1) The query works correctly if a finder is run prior to the query. 2) The query works correctly when the query definition is removed from the orm.xml file, and moved to the persistence.xml file.
Local fix
Fix in next release.
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V8.0.0 who define query strings in * * mapping (orm.xml) files. * **************************************************************** * PROBLEM DESCRIPTION: Prevent reparsing annotation metadata * * for queries. * **************************************************************** * RECOMMENDATION: * **************************************************************** When a query is defined in a mapping file (orm.xml), metadata for the query may not be found upon first run of the query. To prevent this issue, you must set a custom property. The property name is 'openjpa.Compatibility'and takes a value 'ParseAnnotationsForQueryMode=false'. This property can be set as a JVM custom property, or in a persistence.xml file, as follows: <property name="openjpa.Compatibility" value="ParseAnnotationsForQueryMode=false"/>
Problem conclusion
With this fix, when enabled, query metadata will be property read for queries defined in mapping files. The fix for this APAR is currently targeted for inclusion in Service Level (Fix Pack) 8.0.0.2 of WebSphere Application Server version 8.0.0. 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
PM42172
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
2011-06-21
Closed date
2011-09-08
Last modified date
2011-11-15
APAR is sysrouted FROM one or more of the following:
PM37572
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
Document Information
Modified date:
27 October 2021