My Oracle Support Banner

Complex CLOB Updates Fail With ORA-01461 After RDBMS Upgraded To 11.2.0.1 (Doc ID 1222296.1)

Last updated on FEBRUARY 28, 2023

Applies to:

JDBC - Version 10.2.0.1 to 11.2.0.3.0 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Symptoms



When using various versions of the Oracle JDBC driver against an 11.2.0.1 RDBMS, attempts to update a CLOB column fail with the following error:

ORA-01461: can bind a LONG value only for insert into a LONG column

The following characteristics are observed:

* The problem reproduces with any version of the JDBC driver against an 11.2.0.1 database
* The problem does not reproduce with database versions older than 11.2.0.1
* The problem occurs when the variable length being updated exceeds 4000 characters (despite the fact that the field is a CLOB)
* The problem occurs when an UPDATE statement contains a sub-select statement; when the UPDATE statement does not contain a sub-select statement, the problem does not occur

An example of such an UPDATE statement containing a sub-select:




The problem occurs whether the Java code uses setCharacterStream() or setString().

Changes

The problem appears after installing or upgrading the database to version 11.2.0.1.

Cause

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
Symptoms
Changes
Cause
Solution
References


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