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: Ref cursor is invalid error !

843859Jul 13 2005 — edited Mar 15 2007
Hi,

I'm getting the following error while retrieving the cursor object. Just wondering what could be the possible reason. The stored proc is returning the cursor properly. The code I'm using is as follows:

cStt.registerOutParameter(1, OracleTypes.CURSOR) ; cSttt.registerOutParameter(1, OracleTypes.CURSOR) ;

cStt.execute();

rSet = (ResultSet) cStt.getObject(1);
rSet = (ResultSet) cStt.getObject(2);

The first cursor is working fine, but i'm getting error for the next cursor ie. 2.

java.sql.SQLException: Ref cursor is invalid
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.jav
a:3681)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.jav
a:5792)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.jav
a:5622)
at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableSt
atement.java:698)
at com.cisco.pfa.bsc.portal.dao.BSCActualPortalDAO.getMultipleAnswerData
(BSCActualPortalDAO.java:640)


Any pointer on this will be highly appreciated.

Thnx,
Shamik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2007
Added on Jul 13 2005
4 comments
1,404 views