File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Resultset Exhausted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Resultset Exhausted" Watch "Resultset Exhausted" New topic
Author

Resultset Exhausted

jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 85

Hi,

I am having "Exhausted Resultset" error in the below part of code. This error i ma facing only in production server but not in test server. What may be the Issue ?



Error Logs

Entered getLsaID method
Sql SELECT Query SELECT LSA_ID FROM NP_MAIN.NP_PORT_REQ_DTLS WHERE NP_TXN_ID=?
java.sql.SQLException: Exhausted Resultset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:388)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at com.np.sc.ProcessSCSYNV.getLsaID(ProcessSCSYNV.java:302)
at com.np.sc.ProcessSCSYNV.main(ProcessSCSYNV.java:103)
Exit getLsaID method
Entered getCurrentStateID method
Sql Select Query SELECT CURRENT_STATE_ID FROM NP_MAIN.NP_TN_DTLS WHERE TN= ? and NP_TXN_ID = ?
java.sql.SQLException: Exhausted Resultset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:388)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at com.np.sc.ProcessSCSYNV.getCurrentStateID(ProcessSCSYNV.java:376)
at com.np.sc.ProcessSCSYNV.main(ProcessSCSYNV.java:106)
Exit getCurrentStateID method


Regards,
Jay

Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Of the above lines of code , which one is

ProcessSCSYNV.java:376


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 85

Hi Asif,

I have mentioned in the code part where error is being thrown.




Regards,
Jaya
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1479
    
    6

Make sure you do have records in the resultset before you retrieve the column value.



Swastik
jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 85

Thanks Swastik. My query returned error !!. Now rectified.

Regards,
Jaya
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1479
    
    6

You are welcome.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resultset Exhausted