IBM Support

PH08220: ADD DB2/Z NAMED PARAMETER SUPPORT TO ECLIPSELINK

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

  • DB2/Z jdbc drivers require a syntax for named parameters
    that
    is different from standard DB2. This support is missing from
    EclipseLink and throws the following exception:
    
    com.ibm.db2.jcc.am.SqlSyntaxErrorException:
    [jcc][10413][10940][4.19.26] Literal replacement parsing
    failed
    for procedure call to DB2 for z/OS. Failing SQL text CALL
    SYSPROC.ATCAAP90(ATCAAP90 => ?). ERRORCODE=-4463,
    SQLSTATE=42601
    at com.ibm.db2.jcc.am.kd.a(Unknown Source)
    at com.ibm.db2.jcc.am.kd.a(Unknown Source)
    at com.ibm.db2.jcc.am.kd.a(Unknown Source)
    at com.ibm.db2.jcc.am.fp.i(Unknown Source)
    at com.ibm.db2.jcc.am.gp.a(Unknown Source)
    at com.ibm.db2.jcc.am.gp.<init>(Unknown Source)
    at com.ibm.db2.jcc.am.CallableStatement.<init>(Unknown
    Source)
    at com.ibm.db2.jcc.t4.xb.<init>(Unknown Source)
    at com.ibm.db2.jcc.t4.b.newCallableStatement_(Unknown
    Source)
    at com.ibm.db2.jcc.am.Connection.prepareCallX(Unknown
    Source)
    at com.ibm.db2.jcc.am.Connection.prepareCallX(Unknown
    Source)
    at com.ibm.db2.jcc.am.Connection.prepareCall(Unknown
    Source)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - Java Persistence API - JPA 2.1 &   *
    *                  EclipseLink                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink does not support            *
    *                      Named Parameters in Stored Procedures   *
    *                      on DB2 for Z.                           *
    *                      This fix provides that support.         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    DB2/z does not currently support calling standard JDBC calls. In
     fact, the driver will throw this exception if you try it:
        com.ibm.db2.jcc.am.SqlException: Invalid operation: Use of
    named parameter markers and standard JDBC APIs on the same
    statement is not supported. ERRORCODE=-4476, SQLSTATE=null
    
    Support needed to be added to EclipseLink DB2Platform to call
    the DB2z, driver-specific API methods in order to get it
    working.
    
    Example:
        StoredProcedureQuery storedProcedure =
    em.createStoredProcedureQuery("TESTPROC");
    
    storedProcedure.registerStoredProcedureParameter("test_param",
    String.class, ParameterMode.INOUT);
        storedProcedure.setParameter("test_param", null);
        storedProcedure.execute();
        return (String)
    storedProcedure.getOutputParameterValue("test_param");
    
    With this example, an exception will be throw similar to this:
    
    Exception interne : com.ibm.db2.jcc.am.SqlSyntaxErrorException:
    [jcc][10413][10940][4.19.26] Literal replacement parsing failed
    for procedure call to DB2 for z/OS. Failing SQL text CALL
    SYSPROC.TESTPROC(test_param => ?). ERRORCODE=-4463,
    SQLSTATE=42601
     at
    org.eclipse.persistence.exceptions.DatabaseException.sqlExceptio
    n(DatabaseException.java:340)
     at
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor
    .basicExecuteCall(DatabaseAccessor.java:684)
     at
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor
    .executeCall(DatabaseAccessor.java:560)
     at
    org.eclipse.persistence.internal.sessions.AbstractSession.basicE
    xecuteCall(AbstractSession.java:2061)
     at
    org.eclipse.persistence.sessions.server.ClientSession.executeCal
    l(ClientSession.java:309)
     at
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMech
    anism.executeCall(DatasourceCallQueryMechanism.java:262)
     at
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMech
    anism.executeCall(DatasourceCallQueryMechanism.java:248)
     at
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMech
    anism.execute(DatasourceCallQueryMechanism.java:240)
     at
    org.eclipse.persistence.queries.ResultSetMappingQuery.executeDat
    abaseQuery(ResultSetMappingQuery.java:312)
     at
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQu
    ery.java:911)
     at
    org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWor
    k(DatabaseQuery.java:810)
     at
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.interna
    lExecuteQuery(UnitOfWorkImpl.java:2899)
     at
    org.eclipse.persistence.internal.sessions.AbstractSession.execut
    eQuery(AbstractSession.java:1863)
     at
    org.eclipse.persistence.internal.sessions.AbstractSession.execut
    eQuery(AbstractSession.java:1845)
     at
    org.eclipse.persistence.internal.sessions.AbstractSession.execut
    eQuery(AbstractSession.java:1810)
     at
    org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(
    QueryImpl.java:258)
     at
    org.eclipse.persistence.internal.jpa.StoredProcedureQueryImpl.ex
    ecute(StoredProcedureQueryImpl.java:316)
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH08220

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-02-05

  • Closed date

    2020-01-28

  • Last modified date

    2020-01-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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 January 2020