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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Closed Statement issue" Watch "Closed Statement issue" New topic

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
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

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:


or you can write your own from scratch.
I agree. Here's the link: http://aspose.com/file-tools
subject: Closed Statement issue