My Oracle Support Banner

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:


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.