IBM Support

PM93337: OPENJPA CRITERIA API AND CANONICAL METAMODEL RESULT IN SQL EXCEPTIONS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • OpenJPA Criteria API and canonical metamodel result in SQL
    Exceptions when using WebSphere version 8.0:
    
    ORA-00918 column ambiguously defined
    ORA-00936 missing expression - WHERE clause for the primary key
               attribute is not included in the statement
    
    The generated source code for canonical metamodel classes
    mirrored the same inheritance hierarchy of the domain classes.
    
    The problem is also reported in  OPENJPA-2305
    
    Canonical MetaModel class generation should not use inhertence
    https://issues.apache.org/jira/browse/OPENJPA-2305
    

Local fix

  • na
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile who make use of      *
    *                  JPA generated MetaModel.                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: JPA Canonical MetaModel class           *
    *                      generation should not use inheritance.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The generated source code for canonical metamodel classes
    mirrored the same inheritance hierarchy of the domain classes.
    This strategy exposed an error that resulted in wrong target
    SQL query under the following domain model:
    a) A @MappedSuperClass M defined a primary key field x
    b) The primary key field x is an @EmbeddedId E
    c) An @Entity class D derived from M and navigated to the
    fields of E via x
    

Problem conclusion

  • With this fix, code has been added to OpenJPA to make certain
    the correct MetaModel is generated when inheritance is used in
    a domain model.
    
    The fix for this APAR is currently targeted for
    inclusion in Service Levels (Fix Packs) 8.5.5.1.
    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

    PM93337

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2013-07-18

  • Closed date

    2013-09-12

  • Last modified date

    2013-09-12

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

    PM79670

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

Fix information

  • Fixed component name

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

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

Document Information

Modified date:
11 January 2022