IBM Support

PH29720: ECLIPSELINK JPQL COALESCE FUNCTION USES IMPROPER WHITESPACE

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

  • Description: EclipseLink generates SQL for the coalesce function
    with incorrect whitespace. This can cause certain SQL parsers
    to throw a DatabaseException when attempting to parse the SQL.
    
    Incorrect SQL: SELECT foo FROM Bar WHERE (foo = COALESCE(foo,?,?
    ))
    
    Correct SQL: SQL: SELECT foo FROM Bar WHERE (foo = COALESCE(foo,
    ?, ?))
    
    Possible SQL exception:
    
    Internal Exception: com.ibm.db2.jcc.am.SqlSyntaxErrorException:
    [jcc][50053][12311][4.26.16] T2zOS exception:
    [jcc][T2zos]T2zosPreparedStatement.readPrepareDescribeOutput_:na
    tivePrepareInto:1583: DB2 engine SQL error, SQLCODE = -104,
    SQLSTATE = 42601, error tokens = ,0;AT YEAR YEARS MONTH MONTHS
    DAY DAYS HOUR HOURS MINUTE MINUTES ERRORCODE=-104,
    SQLSTATE=42601
    Error Code: -104
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - DB2 zOS - Java Persistence API -   *
    *                  JPA 2.1 & EclipseLink                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink creates SQL for COALESCE    *
    *                      that doesnt properly format the         *
    *                      whitespace. DB2 zOS SQL parsers         *
    *                      can throw an exception.                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    EclipseLink generates SQL for the coalesce function
    with incorrect whitespace. This can cause certain SQL parsers,
    like DB2 zOS, to throw a DatabaseException when attempting to
    parse the SQL.
    Incorrect SQL: COALESCE(foo,?,? ))
    Correct SQL: COALESCE(foo, ?, ?))
    Exception:
    ´´´
    Internal Exception: com.ibm.db2.jcc.am.SqlSyntaxErrorException:
    [jcc][50053][12311][4.26.16] T2zOS exception:
    [jcc][T2zos]T2zosPreparedStatement.readPrepareDescribeOutput_:na
    tivePrepareInto:1583: DB2 engine SQL error, SQLCODE = -104,
    SQLSTATE = 42601, error tokens = ,0;AT YEAR YEARS MONTH MONTHS
    DAY DAYS HOUR HOURS MINUTE MINUTES ERRORCODE=-104,
    SQLSTATE=42601
    Error Code: -104
    ´´´
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH29720

  • Reported component name

    WEBSPHERE FOR Z

  • Reported component ID

    5655I3500

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-09-22

  • Closed date

    2020-11-17

  • Last modified date

    2020-11-17

  • 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 FOR Z

  • Fixed component ID

    5655I3500

Applicable component levels

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"900"}]

Document Information

Modified date:
18 November 2020