ORA-1002 'fetch out of sequence' When Using 'select... for update' in JDBC

(Doc ID 1016747.102)

Last updated on SEPTEMBER 01, 2014

Applies to:

JDBC - Version and later
Information in this document applies to any platform.
***Checked for relevance on 30-Oct-2012***


When executing a 'select ... for update' clause through JDBC, you receive the following error:

java.sql.SQLException: ORA-1002: fetch out of sequence
void oracle.jdbc.ttc7.TTIoer.processError()
void oracle.jdbc.ttc7.Oall7.receive()
oracle.jdbc.ttc7.Oall7 oracle.jdbc.ttc7.TTC7Protocol.doOall7(long, int, byte[],
oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int,
oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)
int oracle.jdbc.ttc7.TTC7Protocol.fetch(oracle.jdbc.dbaccess.DBStatement,
oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)
void oracle.jdbc.driver.OracleStatement.doExecuteQuery()
void oracle.jdbc.driver.OracleStatement.doExecute()
void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(java.lang.String)
java.sql.ResultSet oracle.jdbc.driver.OracleStatement.executeQuery(java.lang.String)


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms