Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: Closed Connection: next

435631Jan 2 2005 — edited Jan 19 2005
java.sql.SQLException: Closed Connection: next

Here's the JDBC SELECT code:

Class.forName(driver);
con = DriverManager.getConnection(url, user, password);
stmt = con.createStatement();

rs = stmt.executeQuery(select_query);

while(rs.next()) /*Exception occurs on this line! */
{
....
}

Here's what I know:

I can connect to the instance using TORA ok.

The SQL query returns rows from TORA.

I believe the connections are ok because if I purposely mess up the syntax, I get back ORA-errors.

I can execute an INSERT statement ok from a servlet.

I'm using the classes12.zip drivers from the oracle jdbc installation directory.

I'm using the default JDK in WSAD 5.1

Thank you all for helping!

Ryan
rreynoldsx@bellsouth.net
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2005
Added on Jan 2 2005
4 comments
1,677 views