Fixes are available
APAR status
Closed as program error.
Error description
Exception: <openjpa-2.1.2-SNAPSHOT-r422266:1179900 fatal general error> org.apache.openjpa.persistence.PersistenceException: Descriptor index not valid. FailedObject: jpa.entities.MyEnt-jpa.entities.MyEntPK@fc1cc28f [java.lang.String] at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.jav a:4878)
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V8.0.0 and V8.5.0 who make * * use of result set mapping * * (@SqlResultSetMapping) in their JPA * * Entities. * **************************************************************** * PROBLEM DESCRIPTION: Result set mapping was not looked up * * when retrieving column data from a * * NamedNativeQuery. * **************************************************************** * RECOMMENDATION: * **************************************************************** Take the following JPA Entity: @Entity @SqlResultSetMapping(name="selectShipRateMapping", entities=@EntityResult(entityClass= org.apache.openjpa.persistence.criteria.results.ShipRate.class, fields = { @FieldResult(name="shipRateId", column = "id"), @FieldResult(name="billedAsWeight", column = "RBLWGT") } )) @NamedNativeQuery(name = "selectShipRateQuery", query = "SELECT shipRateId as id, billedAsWeight as RBLWGT from ShipRate", resultSetMapping="selectShipRateMapping") public class ShipRate { @Id long shipRateId; private BigDecimal billedAsWeight; ....... When executing a simple JPA query like the following: Query query = entityManager.createNamedQuery("selectShipRateQuery"); An exception will occuring indicating the column index is not valid (the exception message will vary slightly depending on the JDBC driver being used). The exception occurs because OpenJPA code does not properly handle the mapping of the @FieldResult defined in the 'ShipRate' entity above.
Problem conclusion
With this fix, code has been added to ensure proper column mapping will ocure when using result set mappings (@SqlResultSetMapping). The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 8.0.0.5 and 8.5.0.1 of WebSphere Application Server versions 8.0.0 and 8.5.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
PM70188
Reported component name
LIBERTY PROFILE
Reported component ID
5724J0814
Reported release
850
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-08-03
Closed date
2012-08-03
Last modified date
2012-08-03
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
LIBERTY PROFILE
Fixed component ID
5724J0814
Applicable component levels
R850 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"850","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
29 October 2021