DB2 driver with Websphere server - Websphere

This is a discussion on DB2 driver with Websphere server - Websphere ; Hi, I get the following error when i access my application from websphere. com.ibm.db2.jcc.b.SqlException: Invalid operation: result set closed at com.ibm.db2.jcc.b.ad.lb(ad.java(Compiled Code)) at com.ibm.db2.jcc.b.ad.z(ad.java:1742) at com.ibm.db2.jcc.b.ad.getRow(ad.java:1730) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getRow(W SJdbcResultSet.java:1675) at org.hibernate.impl.ScrollableResultsImpl.getRowNum ber(ScrollableResultsImpl.java:443) The error comes when i call getRowNumber() of ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: DB2 driver with Websphere server

  1. DB2 driver with Websphere server

    Hi,
    I get the following error when i access my application from websphere.

    com.ibm.db2.jcc.b.SqlException: Invalid operation: result set closed
    at com.ibm.db2.jcc.b.ad.lb(ad.java(Compiled Code))
    at com.ibm.db2.jcc.b.ad.z(ad.java:1742)
    at com.ibm.db2.jcc.b.ad.getRow(ad.java:1730)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getRow(W SJdbcResultSet.java:1675)
    at org.hibernate.impl.ScrollableResultsImpl.getRowNum ber(ScrollableResultsImpl.java:443)

    The error comes when i call getRowNumber() of org.hibernate.ScrollableResults. When i print the result set class from ScrollableResults it gives com.ibm.ws.rsadapter.jdbc.WSJccResultSet which is a websphere adapter class.

    Can anyone please help how to solve this problem.

    Thanks in advance
    Kavi

  2. Re: DB2 driver with Websphere server

    Hi Kavi,
    i had a similar error with nested result set access.
    try setting following

    Resources -> JDBC Provider -> select your Provider -> Data Sources -> Custom Properties

    Set the key "resultSetHoldability" to the value "1".

    The description of the Property is the following:
    Determine whether ResultSets are closed or kept open when committing a transaction. The possible values are: 1 (HOLD_CURSORS_OVER_COMMIT), 2 (CLOSE_CURSORS_AT_COMMIT).

    There is a good way to diagnose the problem with DB2 driver failures, if you switch to the Type2 JDBC driver. This gives much better error messages which work together with the db2 infocenter quite fine. Maybe this is an option.

    regards
    Christian



  3. Re: DB2 driver with Websphere server

    hi kavi,
    i forget. You have to set this in the Websphere Application Server Console.

    regards
    Christian

+ Reply to Thread