I have a scenrio where, while iterating over a resultset, the partitions in the underlying table may get deleted due the
scheduled purging activity. ORA-01410: invalid ROWID is thrown if the row in resultset gets dropped due to partition deletion.
I would like to handle this and continue to next row of the resultset.
Calling next() on a resultset, for which a previous next() call has raised exception will work or not?
Still in process of
unit testing
This is how I try to handle it.
moveNext() method definition
I am using Oracle 10, jdk 1.6
The exception stack trace is
java.sql.SQLException: ORA-01410: invalid ROWID
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1006)
at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:314)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:228)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:39)
at java.lang.reflect.Method.invoke(Method.java:612)
at oracle.ucp.jdbc.proxy.ResultSetProxyFactory.invoke(ResultSetProxyFactory.java:190)
at $Proxy2.next(Unknown Source)