Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.sqlException:object has been closed

 
k kkkk
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using search stored related procedure by applyingdifferent search criteria.

That stored procedure is much complex and can retrive records in terms of lakhs.

In 1 out of 50 cases it has been found that sql exception bject has been closed is thrown.

Can anyone give me tips such that problem can be sorted out.

I am using macromedia.jdbc.MacromediaDriver for DB connection
and
setting in jrun-resources.xml is as below:
<connection-timeout>1200</connection-timeout>
<transaction-timeout>20</transaction-timeout>
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that you are doing something like closing a connection first and the statements later. It is difficult to point to the exact cause unless you post some code.

And by the way, before the moderator reminds you... you should be using your fully qualified name. A name with all k's doesn't seem correct.
[ August 31, 2005: Message edited by: Annie Smith ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your Connection variable is not local, then another piece of code can close the Connection which your thread still needs.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"k kkkk",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic