File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ObjectClosedException: DSRA9110E: Statement is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ObjectClosedException: DSRA9110E: Statement is closed" Watch "ObjectClosedException: DSRA9110E: Statement is closed" New topic

ObjectClosedException: DSRA9110E: Statement is closed

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
I am using sharable Connection pool with WAS 5.1

In most cases my DataSource/Connection Pool works fine but for some cases , it throws
ObjectClosedException: DSRA9110E: Statement is closed.

in following code , it throws above exception while executing getUpdateCount()

Strange thing is , it works for most cases , and it throws this exception randomly at any select execution (which is using above code)

Thanks in advance
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 411
It seems more like a BAd data issue to me where data is not in proper fromat and thus callable statment fails
You need to provide more info before something can be commented concretely

SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

According to the Spring forum, this is caused by a bad connection from the pool, and can be solved by providing a test sql to the pool.

Regards, Jan

OCUP UML fundamental and ITIL foundation
Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155

on execution of cs = conn.prepareCall(sql) , it returns callablestatement cs which is bad.

so whereever I use cs in the code after above exeuction. It throws errors "Statement is closed"
so Problem starts happening before it executes cs.execute() and thus data is not an issue.


I had set up parameter preTestSqlString for preTesting but still it's throwing the same Exception. But when I digged more in the preTestSql instructions , I seem to have missed out one of the steps.
So I am trying to set up the preTestSQL again.

Let me know if anyone has more inputs. Your help is appreciated.

- Anand
I agree. Here's the link:
subject: ObjectClosedException: DSRA9110E: Statement is closed
jQuery in Action, 3rd edition