Home Navigation

Saturday 31 March 2018

ObjectClosedException: DSRA9110E: ResultSet is closed

When you use WebSphere Application Server with an IBM DB2 database, this exception could occur:
Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
To avoid such exceptions, you must add custom properties in WebSphere Application Server at the Application Center data source level.
Procedure

  • Log in to the WebSphere Application Server administration console.
  • Select Resources > JDBC > Data sources > Application Center DataSource name > Custom properties and click New.
  • In the Name field, enter allowNextOnExhaustedResultSet.
  • In the Value field, type 1.
  • Change the type to java.lang.Integer.
  • Click OK.
  • Click New.
  • In the Name field, enter resultSetHoldability.
  • In the Value field, type 1.
  • Change the type to java.lang.Integer.
  • Click OK and save your changes.
The possible values of resultSetHoldability are:
1 (HOLD_CURSORS_OVER_COMMIT),
2 (CLOSE_CURSORS_AT_COMMIT).

No comments:

Post a Comment