IBM Support

PM35285: AN ENTITY THAT IS TRYING TO PERSIST THAT HAS AN ARRAYLIST<THROWABLE>.WHEN TRYING TO ACCESS DBGETTING ANEXCEPTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

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.assertNoSchemaComponent
    s(Mappin
    gInfo.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:                                              *
    ****************************************************************
    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.assertNoSchemaComponent
    s(MappingInfo.java:327)
    at
    org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.map(Han
    dlerFieldStrategy.java:77)
    at
    org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMappi
    ng.java:121)
    at
    org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStr
    ategy(RuntimeStrategyInstaller.java:80)
    at
    org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMa
    pping.java:454)
    at
    org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.j
    ava:419)
    at
    org.apache.openjpa.jdbc.meta.ClassMapping.resolveNonRelationMapp
    ings(ClassMapping.java:881)
    at
    org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(Ma
    ppingRepository.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.
    
    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

    PM35285

  • Reported component name

    JPA OSGI FEATUR

  • Reported component ID

    5724J0857

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-03-21

  • Closed date

    2011-03-21

  • Last modified date

    2011-03-21

  • APAR is sysrouted FROM one or more of the following:

    PM33811

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JPA OSGI FEATUR

  • Fixed component ID

    5724J0857

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2020