SQLException: Protocol Violation When Using DML Returning Statement

(Doc ID 371588.1)

Last updated on AUGUST 03, 2016

Applies to:

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


Using a DML returning clause like

CallableStatement st = conn.prepareCall("insert into test values (empty_blob()) returning test into ?");
st.registerOutParameter(1, Types.BLOB);

with JDBC driver 10.1.0.x results in

java.sql.SQLException: Proto violation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4988)
at sk.gnome.posnet.PosnetModuleImpl.sendExcelToDionica(PosnetModuleImpl.java:519)

with the thin driver, and it results in

java.sql.SQLException: Numeric Overflow
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.OracleCallableStatement.getLong(OracleCallableStatement.java:1149)
at sk.gnome.posnet.PosnetModuleImpl.sendExcelToDionica(PosnetModuleImpl.java:520)

with the oci driver.


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