IBM Support

PH36839: ECLIPSELINK THROWS NULLPOINTEREXCEPTION FROM EMBEDDED TEMPORAL MAPKEYS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • EclipseLink throws a NullPointerException when attempting to
    em.merge() a @MapKeyTemporal relationship.
    
    Exception:
    ´´´
    java.lang.NullPointerException
     at
    org.eclipse.persistence.mappings.converters.TypeConversionConver
    ter.convertObjectValueToDataValue(TypeConversionConverter.java:2
    10)
     at
    org.eclipse.persistence.mappings.foundation.AbstractDirectMappin
    g.extractIdentityFieldsForQuery(AbstractDirectMapping.java:554)
     at
    org.eclipse.persistence.internal.queries.MappedKeyMapContainerPo
    licy.getKeyMappingDataForWriteQuery(MappedKeyMapContainerPolicy.
    java:145)
     at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.prep
    areModifyQueryForDelete(AggregateCollectionMapping.java:2594)
     at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.obje
    ctRemovedDuringUpdate(AggregateCollectionMapping.java:2339)
     at
    org.eclipse.persistence.mappings.CollectionMapping.compareObject
    sAndWrite(CollectionMapping.java:781)
     at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.post
    Update(AggregateCollectionMapping.java:2451)
     at
    org.eclipse.persistence.descriptors.DescriptorQueryManager.postU
    pdate(DescriptorQueryManager.java:1037)
     at
    org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.
    updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:11
    09)
     at
    org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitW
    ithChangeSet(UpdateObjectQuery.java:86)
     at
    org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.
    executeWriteWithChangeSet(DatabaseQueryMechanism.java:316)
     at
    org.eclipse.persistence.queries.WriteObjectQuery.executeDatabase
    Query(WriteObjectQuery.java:60)
     at
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQu
    ery.java:911)
    ´´´
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - Java Persistence API - JPA 2.1 &   *
    *                  EclipseLink                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink throws a                    *
    *                      NullPointerException when attempting    *
    *                      to merge an Entity with a               *
    *                      @MapKeyTemporal                         *
    *                      relationship                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Example:
    ´´´
    @Entity
    public class SimpleEntity {
    @Id
    private int id;
    @ElementCollection(fetch = FetchType.EAGER)
    @CollectionTable(name = "EntMapDateTemporalPAE",
    joinColumns = @JoinColumn(name = "parent_id"))
    @MapKeyColumn(name = "mykey")
    @MapKeyTemporal(TemporalType.DATE)
    private Map<Date, SimpleTemporalEmbed>
    mapKeyTemporalValueEmbed;
    &#180;&#180;&#180;
    Exception:
    &#180;&#180;&#180;
    java.lang.NullPointerException
    at
    org.eclipse.persistence.mappings.converters.TypeConversionConver
    ter.convertObjectValueToDataValue(TypeConversionConverter.java:2
    10)
    at
    org.eclipse.persistence.mappings.foundation.AbstractDirectMappin
    g.extractIdentityFieldsForQuery(AbstractDirectMapping.java:554)
    at
    org.eclipse.persistence.internal.queries.MappedKeyMapContainerPo
    licy.getKeyMappingDataForWriteQuery(MappedKeyMapContainerPolicy.
    java:145)
    at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.prep
    areModifyQueryForDelete(AggregateCollectionMapping.java:2594)
    at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.obje
    ctRemovedDuringUpdate(AggregateCollectionMapping.java:2339)
    at
    org.eclipse.persistence.mappings.CollectionMapping.compareObject
    sAndWrite(CollectionMapping.java:781)
    at
    org.eclipse.persistence.mappings.AggregateCollectionMapping.post
    Update(AggregateCollectionMapping.java:2451)
    &#180;&#180;&#180;
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH36839

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-04-29

  • Closed date

    2021-07-07

  • Last modified date

    2021-07-07

  • 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

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R900 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":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
01 November 2021