IBM Support

PM34463: 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.yyyyyyy._zzzzzz<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 the Java Persistence API       *
    *                  (JPA) 2.0 feature of the IBM &#130; &#174; WebSphere &#130;
    *                  Application Server V7 Feature Pack for      *
    *                  OSGi Applications and Java Persistence API  *
    *                  2.0 who use XML overrides in a mapping      *
    *                  file to over ride an entity filed defined   *
    *                  as ArrayList.                               *
    ****************************************************************
    * PROBLEM DESCRIPTION: XML overriding column names for         *
    *                      ArrayList attributes causes exception.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Take an 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 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 entities ArrayList field is properly mapped.
    
    The fix for this APAR is currently targeted for inclusion
    in Fix Pack 1.0.0.5 for Feature Pack for OSGi Applications and
    Java Persistence API 2.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

    PM34463

  • 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-09

  • Closed date

    2011-03-14

  • Last modified date

    2011-03-14

  • 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



Document information

More support for: WebSphere Application Server V7 Feature Pack for OSGi Applications and Java Persistence API 2.0
General

Software version: 1.0

Reference #: PM34463

Modified date: 14 March 2011