ORA-22816: Unsupported Feature With RETURNING CLAUSE when ResultSet.insertRow() Is Executed (Doc ID 2246780.1)

Last updated on MARCH 22, 2017

Applies to:

JDBC - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

WebLogic 12.1.3 application using JDBC 12.1.0.2 receives an "ORA-22816: unsupported feature with RETURNING clause" error message when inserting into a view with a trigger on it.
The trigger is defined as "INSTEAD OF INSERT" . The stack trace from the application is below. The application is using a java.sql.ResultSet generated from a java.sql.PreparedStatement and the error is thrown when ResultSet.insertRow() is executed:
 



ERROR
-----------------------

java.sql.SQLException: ORA-22816: unsupported feature with RETURNING clause

  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.doOall8(T4CPreparedStatement.java:53)
  at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943)
  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150)
  at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
  at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4875)
  at oracle.jdbc.driver.UpdatableResultSet.executeInsertRow(UpdatableResultSet.java:1309)
  at oracle.jdbc.driver.UpdatableResultSet.insertRow(UpdatableResultSet.java:790)



STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create view.
2. Create "INSTEAD OF INSERT trigger.
3. Try to perform the insert.


Cause

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