IBM Support

PM93884: OpenJPA MetaDataRepository preload doesn't load JAXB meta data which can result in NullPointerException

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • In a Thread concurrency scenario the following
    NullPointerException can occur:
    
    Caused by: java.lang.NullPointerException
    at
    org.apache.openjpa.lib.util.J2DoPrivHelper$56.run(J2DoPrivHelper
    .java:1163)
    at
    org.apache.openjpa.lib.util.J2DoPrivHelper$56.run(J2DoPrivHelper
    .java:1161)
    at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:202)
    at
    org.apache.openjpa.persistence.AnnotationPersistenceXMLMetaDataP
    arser.parseXMLClassAnnotations(AnnotationPersistenceXMLMetaDataP
    arser.java:175)
    at
    org.apache.openjpa.persistence.AnnotationPersistenceXMLMetaDataP
    arser.parse(AnnotationPersistenceXMLMetaDataParser.java:163)
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V7.0.0.                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: OpenJPA MetaDataRepository preload      *
    *                      doesn't load JAXB meta data.            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The OpenJPA MetaDataRepository preloading doesn't process JAXB
    xml meta data on EntityManagerFactory creation, resulting in a
    condition where multiple threads can conflict with each other.
    AnnotationPersistenceXMLMetaDataParser.parse(..) isn't
    thread-safe and relied on the MetaDataRepository to enforce
    synchronization. After preloading is complete, all locks are
    removed from the MetaDataRepository and in turn
    AnnotationPersistenceXMLMetaDataParser can have some threading
    problems.  The following NullPointerException and exception
    stack occurs in this case:
    Caused by: java.lang.NullPointerException
    at
    org.apache.openjpa.lib.util.J2DoPrivHelper$56.run(J2DoPrivHelper
    .java:1163)
    at
    org.apache.openjpa.lib.util.J2DoPrivHelper$56.run(J2DoPrivHelper
    .java:1161)
    at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:202)
    at
    org.apache.openjpa.persistence.AnnotationPersistenceXMLMetaDataP
    arser.parseXMLClassAnnotations(AnnotationPersistenceXMLMetaDataP
    arser.java:175)
    at
    org.apache.openjpa.persistence.AnnotationPersistenceXMLMetaDataP
    arser.parse(AnnotationPersistenceXMLMetaDataParser.java:163)
    at
    org.apache.openjpa.persistence.PersistenceMetaDataFactory.loadXM
    LMetaData(PersistenceMetaDataFactory.java:579)
    at
    org.apache.openjpa.meta.MetaDataRepository.getXMLMetaDataInterna
    l(MetaDataRepository.java:2376)
    at
    org.apache.openjpa.meta.MetaDataRepository.getXMLMetaData(MetaDa
    taRepository.java:2364)
    at
    org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.travers
    ePath(AbstractExpressionBuilder.java:315)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPath(JPQ
    LExpressionBuilder.java:1941)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPathOrCo
    nstant(JPQLExpressionBuilder.java:1861)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLEx
    pressionBuilder.java:1169)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JP
    QLExpressionBuilder.java:2054)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JP
    QLExpressionBuilder.java:2040)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLEx
    pressionBuilder.java:1055)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getExpressi
    on(JPQLExpressionBuilder.java:1970)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLEx
    pressionBuilder.java:997)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalWhereCl
    ause(JPQLExpressionBuilder.java:668)
    at
    org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExp
    ressions(JPQLExpressionBuilder.java:297)
    at
    org.apache.openjpa.kernel.jpql.JPQLParser.eval(JPQLParser.java:6
    7)
    

Problem conclusion

  • With this fix, code has been added to OpenJPA to properly
    synchronize access to the OpenJPA MetaDataRepository to avoid
    thread conflicts when processing JAXB xml meta data.
    
    The fix for this APAR is currently targeted for
    inclusion in Service Level (Fix Pack) 7.0.0.31 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

    PM93884

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-07-25

  • Closed date

    2013-08-28

  • Last modified date

    2013-08-28

  • 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

  • R700 PSY

       UP



Document information

More support for: WebSphere Application Server
General

Software version: 7.0

Reference #: PM93884

Modified date: 28 August 2013