Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ObjectClosedException: DSRA9110E: Statement is closed

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurav,

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.

Jan,

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.

Thanks
- Anand
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic