ORA-01002 : 'Fetch Out of Sequence' Encountered When Using 'select... for update' in JDBC

(Doc ID 1160014.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 10.1.0 to
Oracle Containers for J2EE - Version and later
Information in this document applies to any platform.


When executing a SELECT FOR UPDATE through the OCI JDBC driver with the 'Auto Commit' enabled, following error is reported:
java.sql.SQLException: ORA-01002: fetch out of sequence

The same problem is not seen using Oracle Thin drivers.

The full stack trace of the error extracted from the log file is as follows:


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