ORA-24816 Error Occurs When Attempting To Insert LOB Data Bigger Than 2000 Bytes in Length Using 12c OCI Driver

(Doc ID 2337144.1)

Last updated on DECEMBER 13, 2017

Applies to:

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

Symptoms

In JDBC OCI 12.1.0.2 when attempting to insert data into a table that contains LOBs bigger than 2000 bytes, the following error is received:

Exception in thread "main" java.sql.SQLException: ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column

at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:971)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:867)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:675)
at oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:931)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1143)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3893)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3970)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1361)
at test.main(test.java:53)

 

 

Rearranging the order of the SQL per <Document 746333.1> ORA-24816 On Insert Statement does not work.

 

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