Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DSRA9110E: Statement is closed issue occurs randomly while executing queries

 
knowledge seeker
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using WAS6.1 as my app server and looking up a data source on Web sphere.
While executing queries using a connection acquired via the data source look-up, I get the following exception trace while executing queries,though it occurs randomly:

Caused by:
com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.runtimeXIfNotClosed(WSJdbcStatement.java:1505)
at com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getInt(WSJdbcCallableStatement.java:451)

I have tried using a test sql statement to ensure that the connection ppol does not return stale connections but even that does not solve the problem. I have also set Statement cache size to 50.
Does anyone have any solution to this issue?
 
Marcelo Sousa Ancelmo
Ranch Hand
Posts: 498
Eclipse IDE Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knowledge Seeker,

Javaranch has a name policy, that you can find here.

For the stale connection problem, you can lower the aged timeout for the connection pool to a value lesser than the timeout of the database. Also, if you are behind a firewall, you should see if there is some timeout in it also.
As a rule of thumb, you could use the following:
Connection Pool Timeout
Less than
Firewall Timeout
Less than
Database Timeout

Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic