IBM Support

PH45755: ECLIPSELINK NEGATE EXPRESSION INAPPROPRIATELY SETS INTEGER AS RETURN TYPE.

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 sets Integer as the negate expression's return type,
    instead of using the type used by the input expression.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - Java Persistence API -             *
    *                  EclipseLink                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: Eclipselink throws a                    *
    *                      ClassCastException if the               *
    *                      CriteriaBuilder.neg() method is used    *
    *                      with a Number type other than Integer   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Eclipselink incorrectly assumes the result type of the
    CriteriaBuilder.neg() method is Integer.class type. Instead,
    the result should be the passed Expression type, which should
    extend java.lang.Number. For instance, if the result of the
    passed Expression is BigDecimal, EclipseLink throws the
    following exception.
    Exception:
    ```
    org.eclipse.persistence.exceptions.QueryException Exception
    Description: An Exception was thrown while executing a
    ReportQuery with a constructor expression:
    java.lang.reflect.InvocationTargetException Internal
    Exception: java.lang.reflect.InvocationTargetException Target
    Invocation Exception: java.lang.ClassCastException:
    java.lang.Integer cannot be cast to java.math.BigDecimal
    Query: ReportQuery(referenceClass=CritEntity sql="SELECT
    SUM(CASE WHEN (ID = ?) THEN VALUE ELSE -(VALUE) END ) FROM
    CRITENTITY")
    ```
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH45755

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-04-18

  • Closed date

    2022-08-05

  • Last modified date

    2022-08-05

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

[{"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:
06 August 2022