AnsweredAssumed Answered

Receiving ORA-01002 Fetch out of Sequence error while running simple insert query using Oracle JDBC driver

Question asked by AVBAW on Dec 20, 2017
Latest reply on Dec 22, 2017 by AVBAW

DevTest Version - DevTest 10.1.x
OS - Windows 7
Database - Oracle 4.0.1.14

 

We are receiving ORA-01002 Fetch out of Sequence error while running simple insert query.

Insert query inserts the data in oracle DB in respective table but @ DevTest end we are receiving Fetch out of sequence error.

 

Below is the Error stack

------------------------------------------------------------------------------------------
java.sql.SQLException: ORA-01002: fetch out of sequence

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1066)
at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3716)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:1015)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:979)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:579)
at com.itko.lisa.jdbc.JDBCResultSetCache.getRowData(JDBCResultSetCache.java:61)
at com.itko.lisa.jdbc.JDBCResultSetCache.<init>(JDBCResultSetCache.java:54)
at com.itko.lisa.jdbc.JDBCNode.makeGenericCall(JDBCNode.java:463)
at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:387)
at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(JDBCNodeEditor.java:483)
at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(JDBCNodeEditor.java:417)
at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
at java.lang.Thread.run(Thread.java:745)

 

Below is the insert query

----------------------------------------------------------------------------------
INSERT into <Table Name> (CLASS_TYPE,CLASS_UNIT_TYPE,CLASS_UNIT_CODE,ID,NAME,LANG_CODE,CTY_CODE,TRANS_DTIME)
VALUES(?,?,?,?,?,?,?,?)

Outcomes