File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes java.sql.SQLException: Cursor is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.sql.SQLException: Cursor is closed" Watch "java.sql.SQLException: Cursor is closed" New topic

java.sql.SQLException: Cursor is closed

Kaustubh Dasgupta

Joined: Jan 22, 2007
Posts: 3
I am returning a ref cursor from my oracle procedure and trying to get the data in my DAO class. But I am getting the following error:

[2/1/07 18:38:41:766 IST] 0000003d SystemErr R java.sql.SQLException: Cursor is closed.

at oracle.jdbc.driver.T4CResultSetAccessor.getCursor(

at oracle.jdbc.driver.ResultSetAccessor.getObject(

at oracle.jdbc.driver.OracleCallableStatement.getObject(



Can any one help.

Thanks in advance.

Srikanth Basa
Ranch Hand

Joined: Jun 06, 2005
Posts: 241
Its hard to conclude the reason without looking at the source.

Check thislink
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1323

where you are closing the cursor remove that line. might be it works

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
I agree. Here's the link:
subject: java.sql.SQLException: Cursor is closed
It's not a secret anymore!