• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

StaleConnectionException

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I�m using Websphere 4 in a application and i have this problem :
I read a file with 13000 lines and then execute line to line a block of sentences in a loop with a DB2 7.2.
In this block of sentences i open transaction and finally i do commit or rollback.
block of sentences in a loop for.
The connection i get of the connection datasource of the Websphere and i use only one connection. The error i have with multiples conections (open and close the connection for line... each 20 lines, etc..).
Too, the error is the same if all lines is commit or rollback... or having commit or rollback between 10 to 10.... 20 to 20, etc..

Well, ever i have this error in all test that i do,
com.ibm.websphere.ce.cm.StaleConnectionException: class com.ibm.ejs.cm.proxy.ResultSetProxy is closed

exactly in the line 1945

The configuration of the WAS is the tipically.
All resultset and statements are open ok and closed in the finally blocks, i�m sure, work ok.

what�s up?? only i want to die
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Miguel,
The StaleConnection may be happening because your connection is being closed before you can finish the transaction you opened it for.
If the websphere settings are the default then i dont think the problem is the app server. Webshpere creates a pool of connections withing the Datasource, these connections have a lifetime and you can modify that time in your Datasource settings.
I think you have to check the net and the DB2 connection settings. I havent had this problem with DB2 but with Oracle. I solved it by changing the connection timeout setting in the Oracle Server, because it was lower than the WAS timeout for the connections in the pool, i also checked for the TCP/IP connections in the LAN. Try checking those parameters.

best regards,
 
crispy bacon. crispy tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic