Getting ORA-01002 Fetch out of Sequence error while running simple insert query in Devtest JDBC step
search cancel

Getting ORA-01002 Fetch out of Sequence error while running simple insert query in Devtest JDBC step

book

Article ID: 9006

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

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) 

Environment

All supported releases of DevTest.

Cause

N/A

Resolution

The issue was happening due to "Returns Result Set" checkbox selected in the JDBC step.

This option should be selected only when a result set is expected to be returned by the query like with a SELECT statement. 

when a result set is expected to be returned by the query like with a SELECT statement. 

Additional Information

For more information, please refer to section "SQL Database Execution (JDBC)" in the documentation of the DevTest release you are running.