My Oracle Support Banner

Problems With Insert Or Update Through Views (Doc ID 1217825.1)

Last updated on FEBRUARY 03, 2019

Applies to:

JDBC - Version: and later   [Release: 11.2 and later ]
Information in this document applies to any platform.


In Oracle when executing an INSERT or an UPDATE through views based on tables with BLOB type columns following error is reported:
ORA-01461: can only bind a LONG value for insert into a LONG column

It takes place using JDK 1.5.0_16-b02 and with Oracle Database 11g Release 2 ( JDBC Drivers libraries . It happens also with other JDK and JDBC versions.

When an INSERT with a small file (less than 4000bytes) is executed, then everything works fine. But if the cache is cleaned (alter system flush shared_pool) then the error strikes back (as long as the first INSERT or UPDATE is executed with a file smaller than 4000 bytes)

Please find attached the "test case" which produces the following error trace:
java.sql.SQLException: ORA-01461: can only bind a LONG value for insert into a LONG column
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4C8Oall.receive(
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(
at TestViewOra11.main( in thread "main"


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.