IBM Support

PM12152: CAN NOT RETRIEVE DATA IN A RELATIONSHIP WHEN DATACACHE IS ON

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When DataCache is enabled, the retrieval of JPA Entities in a
    relationship will fail with the following exception:
    
    <openjpa-1.0.1-r420667:592145 fatal user error>
    org.apache.openjpa.persistence.ArgumentException: Could not
    locate metadata for the class using oid "10=10" of type "class
    java.util.HashMap$Entry". Registered oid type mappings: "{class
    org.apache.openjpa.util.IntId=class dw.EntityB, class
    java.util.HashMap$Entry=null}"
    FailedObject: 10=10 [java.util.HashMap$Entry]
    at
    org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataR
    epository.java:986)
    at
    org.apache.openjpa.kernel.BrokerImpl.newStateManagerImpl(BrokerI
    mpl.java:1121)
    at
    org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:913
    )
    at
    org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:862
    )
    at
    org.apache.openjpa.kernel.AbstractPCData.toRelationFields(Abstra
    ctPCData.java:214)
    at
    org.apache.openjpa.kernel.AbstractPCData.toNestedFields(Abstract
    PCData.java:181)
    at
    org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.
    java:95)
    at
    org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:1
    97)
    at
    org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:167)
    at
    org.apache.openjpa.datacache.DataCacheStoreManager.load(DataCach
    eStoreManager.java:373)
    at
    org.apache.openjpa.kernel.DelegatingStoreManager.load(Delegating
    StoreManager.java:116)
    at
    org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.j
    ava:78)
    at
    org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManag
    erImpl.java:2867)
    at
    org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManage
    rImpl.java:2945)
    at
    org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(Sta
    teManagerImpl.java:1449)
    at
    org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateM
    anagerImpl.java:1434)
    ......
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V6.1.0 Feature Pack for Enterprise   *
    *                  JavaBeans 3.0 who make use of the           *
    *                  DataCache feature of openJPA and define a   *
    *                  relationship between their JPA Entities.    *
    ****************************************************************
    * PROBLEM DESCRIPTION: When DataCache is enabled, one side     *
    *                      of a relationship is not retrieved.     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The problem occurs when DataCache is enabled and two entities
    are participating either in a one to many or many to many
    relationship.  When an entity is retrieved, and the
    relationship getter called, both entities are properly
    retrieved and placed into the DataCache.  The entities remain
    in the DataCache and access to them works properly.  However,
    when a call to clear the EntityManager context is called, the
    relationship is not properly maintained when retrieving the
    entities from the DataCache, that is, calling the relationship
    getter again will return an empty entity from the DataCache.
    The same behavior is exhibited in the previous scenario when
    using multiple EntityManagers, that is, if one EntityManager
    loads the entities into the DataCache and a second
    EntityManager accesses the entities relationship getters, an
    empty entity will be returned.
    

Problem conclusion

  • With this fix, code was added to ensure the proper relationship
    data is retrived when DataCache is enabled.
    .
    The fix for this APAR is currently targeted for inclusion
    in Enterprise JavaBeans 3.0 Feature Pack Fix Pack 33
    (6.1.0.33) of WebSphere Application Server version 6.1.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

    PM12152

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-04-14

  • Closed date

    2010-05-21

  • Last modified date

    2010-05-25

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

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

Modules/Macros

  • EJB3
    

Fix information

  • Fixed component name

    WAS EJB3 FEATUR

  • Fixed component ID

    5724J0851

Applicable component levels

  • R610 PSY

       UP

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

Document Information

Modified date:
24 October 2021