IBM Support

PM33811; 7.0.0.15: an entity that is trying to persist that has an arraylist<thr

Download


Abstract

XML overriding column names for ArrayList attributes causes exception.

Download Description

PM33811 resolves the following problem:

ERROR DESCRIPTION:
Caused by: org.apache.openjpa.persistence.ArgumentException: You have supplied columns for
"com.xxxxx.xxx.xxx.yyyy._zzzzzzz<element:class java.lang.Throwable>", but this mapping cannot have columns in this context.
at
org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(MappingInfo.java:327)
at

LOCAL FIX:
N/A

PROBLEM SUMMARY

USERS AFFECTED:
All users of IBM WebSphere Application Server V7.0.0 who use XML overrides in a JPA
mapping file (for example, orm.xml) to override a JPA entity field defined as ArrayList.

PROBLEM DESCRIPTION:
XML overriding column names for ArrayList attributes causes exception.

RECOMMENDATION:
None

Take a JPA entity class similar to the following:


public class MyEntity implements Serializable {
protected String _id;
protected ArrayList<String> myStrings =
new ArrayList<String>();
.......

and a corresponding XML mapping in an orm.xml:


<entity class="somepackage.MyEntity" access="FIELD">
<table name="MY_TABLE"/>
<attributes>
<id name="_id">
<column name="MYENTITY_ID" nullable="false" />
</id>
<basic name="myStrings">
<column name="MY_STRINGS"/>
<lob/>
</basic>
</attributes>
</entity>


With this configuration, the following exception can occur:

org.apache.openjpa.persistence.ArgumentException: You have supplied columns for
"somepackage.MyEntity.myStrings<element:class java.lang.String>", but this mapping cannot have columns in this context.
at
org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(MappingInfo.java:327)
at
org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.map(HandlerFieldStrategy.java:77)
at
org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:121)
at
org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:80)
at
org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:454)
at
org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:419)
at
org.apache.openjpa.jdbc.meta.ClassMapping.resolveNonRelationMappings(ClassMapping.java:881)
at
org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:418)
..............


This is caused due to a bug in OpenJPA code whereby the XML override of the ArrayList attribute is not properly mapped.

PROBLEM CONCLUSION:
With this fix, code has been added to ensure an XML override of an entity's ArrayList field is properly mapped.

The fix for this APAR is currently targeted for inclusion in Service Level (Fix Pack) 7.0.0.19 of
WebSphere Application Server version 7.0.0.

Refer to the recommended fixes page for delivery information:
http://www.ibm.com/support/docview.wss?uid=swg27004980

Prerequisites

Please download the UpdateInstaller below to install this fix.

[{"PRLabel":"Update Installer","PRLang":"US English","PRSize":"7250000","PRPlat":{"label":"AIX","code":"PF002"},"PRURL":"http:\/\/www.ibm.com\/support\/docview.wss?uid=swg21205991"}]

Installation Instructions

Please review the readme.txt for detailed installation instructions.

[{"INLabel":"Readme","INLang":"US English","INSize":"8234","INURL":"ftp:\/\/public.dhe.ibm.com\/software\/websphere\/appserv\/support\/fixes\/PM33811\/readme.txt"}]
On
[{"DNLabel":"7.0.0.13-WS-WAS-IFPM33811","DNDate":"3\/28\/2011","DNLang":"US English","DNSize":"4881643","DNPlat":{"label":"AIX","code":"PF002"},"DNURL":"http:\/\/www.ibm.com\/support\/fixcentral\/quickorder?fixids=7.0.0.13-WS-WAS-IFPM33811&product=ibm%2FWebSphere%2FWebSphere+Application+Server&source=dbluesearch","DNURL_FTP":"ftp:\/\/public.dhe.ibm.com\/software\/websphere\/appserv\/support\/fixes\/PM33811\/7.0.0.13-WS-WAS-IFPM33811.pak","DDURL":"http:\/\/public.dhe.ibm.com:7618;sw_websphere;appserv\/support\/fixes\/PM33811\/7.0.0.13-WS-WAS-IFPM33811.pak"}]

Technical Support

Contact IBM Support using SR (http://www.ibm.com/software/support/probsub.html), visit the WebSphere Application Server support web site (http://www.ibm.com/software/webservers/appserv/was/support/), or contact 1-800-IBM-SERV (U.S. only).

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":"Java Persistence API (JPA)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0.0.13;7.0.0.15","Edition":"Base;Express;Network Deployment"}]

Document Information

Modified date:
15 June 2018

UID

swg24029575