• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

ObjectClosedException: DSRA9110E: Statement is closed

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic