IBM Support

PI34744: DB2 COLUMNS DEFINED WITH "BIT DATA" CAN CAUSE OPENJPA EXCEPTION.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The follow exception can occur when retrieving a DB2 "BIT DATA"
    column using OpenJPA:
    
    com.ibm.db2.jcc.b.qi: [ibm][db2][jcc][1092][11643] Invalid data
    conversion: Wrong result column type for requested conversion.
     at com.ibm.db2.jcc.b.eb.N(eb.java:1423)
     at com.ibm.db2.jcc.b.yg.getBlob(yg.java:989)
     at
    com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getBlob(WSJdbcResultSe
    t.java:740)
     at
    org.apache.openjpa.lib.jdbc.DelegatingResultSet.getBlob(Delegati
    ngResultSet.java:580)
     at
    org.apache.openjpa.jdbc.sql.DBDictionary.getBlob(DBDictionary.ja
    va:542)
     at
    org.apache.openjpa.jdbc.sql.DBDictionary.getBytes(DBDictionary.j
    ava:605)
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V7.0.0 who make use of IBM DB2 "BIT  *
    *                  DATA" in a JPA application.                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: IBM DB2 "BIT DATA" used in a JPA        *
    *                      Entity causes an exception in OpenJPA.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Take the following JPA Entity:
    @Entity
    public class ByteArrayHolder implements Serializable {
    @Id
    private int taskId;
    @Column(columnDefinition="CHAR(16) FOR BIT DATA NOT NULL")
    private byte[] tkiid;
    .....
    This entity uses "BIT DATA".  When OpenJPA attempts to
    read this entity from the DB2 database, OpenJPA calls
    'getBlob'.  This can cause an exception when the DB2 column is
    defined as "BIT DATA".  For this type of data, OpenJPA should
    try to read the data using 'getBytes'.
    

Problem conclusion

  • With this fix, code has been added to OpenJPA to properly
    handle IBM DB2 "BIT DATA".
    
    The fix for this APAR is currently targeted for
    inclusion in Service Level (Fix Pack) 7.0.0.39 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

    PI34744

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-02-10

  • Closed date

    2015-06-25

  • Last modified date

    2015-06-25

  • 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

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

Document Information

Modified date:
17 October 2021