• 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

Newbie needs help with "Object has been closed" exception

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aloha ranchers,

I'm starting to work with JDBC and MSSQL this week. This thread is related to this thread for those who are wondering...

With help from a co-worker, I have successfully setup a JNDI datasource in Tomcat. I've also been able to connect to the server and run a simple stored procedure. After turning up the heat a bit, I've ran into a problem and have searched for an answer, which has lead me here.

The Problem:
I'm trying to set up a simple stored procedure that will return a result set (empty is ok for now) of dummy values without accessing any tables. What I have seems to fly with SQL, but on the Java side, the result set is being closed somewhere.

Here's the SP:



And here's the Java code:


The last Java line (logger.debug...) shows "returnCode [00000] Query Timeout: [10]" as expected. However, if I inspect resultSet at that line (using the Sysdeo debugger), it shows the _res->closed property as true. Thus, when I get to the set iterator, an "Object has been closed" exception is thrown. I have been quick enough on the draw at times to see the _res->closed property set to false, but it never makes it to the iterator. Even with no break points set. I suspect there is a setting somewhere, perhaps a poolable(?) one that I don't know where to look for. Anyone have any ideas?

Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic