aspose file tools*
The moose likes JDBC and the fly likes Object has been closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Object has been closed" Watch "Object has been closed" New topic
Author

Object has been closed

Jeremy Taylor
Greenhorn

Joined: Mar 18, 2004
Posts: 8
I'm new to jsp and need help. I have this code working in php, but cant get it to work in jsp. Please help. This page produces this error... I'm running JRun4 with jre1.4.2. I've tried several dsn connections using macromedia's driver, oracle's thin driver and jdbc to odbc bridge and get the same results every time.
Exception in main try block
Error:java.sql.SQLException: [Macromedia][Oracle JDBC Driver]Object has been closed.

[ March 18, 2004: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Despite the fact that you are doing all this processing in a JSP (which I would highly recommend against), this is really a database question. So I'm moving this along to the JDBC forum for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeremy Taylor
Greenhorn

Joined: Mar 18, 2004
Posts: 8
Like I said, I'm new to this. I haven't grasped the concept of javabeans yet. What do you recommend I do? What am I looking at? 3 servlets, 3 javabeans, and a jsp page that calls all 3 javabeans and loops over the results? Can you point me to some docs on javabeans?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Here in this topic, let's keep to the JDBC problem you are having. With regards to web app architecture, please look through the JSP and Servlets forums for tips and best-practice patterns (hint: search for terms MVC and 'Model 2'). Any questions you may have on web app structure will be gladly handled there.
Another hint: use the UBB code tags around your code fragments (I added them to your original post) to preserve the code formatting. Most people will not take the time to try and decipher unformatted code.
Is there any chance you could post the entire stack trace displaying the exact line number where the problem is occurring?
Gowrishankar Mudaliar
Ranch Hand

Joined: Oct 20, 2001
Posts: 39
You are using the dbstatement object for all the resultsets. try using different statement for each resultset.
Gowrishankar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object has been closed
 
Similar Threads
The program error!
exception java.sql.SQLException: Exhausted Resultset
Object has been closed
exception java.sql.SQLException: Exhausted Resultset
jsp:compare select statement error