jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes Closed Statement issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Closed Statement issue" Watch "Closed Statement issue" New topic
Author

Closed Statement issue

Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
I am getting closed exception messages with my below jdbc connection to Oracle 9i from Tomcat 6 container:
java.sql.SQLException: Closed Statement
and
java.sql.SQLException: Closed Statement: next



Please advise what I can modify to eliminate the exception messages?



Servlet controller handling of list:
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Dan Parsons wrote:Please advise what I can modify to eliminate the exception messages?

You better post the stack trace . Also are you sure about compilation of this code, try is NOT immediately followed by catch block


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
You can use appache commons DBUtils library:
http://commons.apache.org/dbutils/apidocs/org/apache/commons/dbutils/DbUtils.html

example:


or you can write your own from scratch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closed Statement issue
 
Similar Threads
Error compiling JSP
LoginBean doesn't compile
Difference between running in Eclipse and as a jar
which session listner to be impletement
JSTL for loop error