Insert Into Table Containing XMLTYPE Column Fails With ORA-01461 Using JDBC (Doc ID 1179153.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version 10.1.0.5 to 10.2.0.5 [Release 10.1 to 10.2]
Information in this document applies to any platform.

Symptoms


Using a PreparedStatement.setString() to insert into an XMLTYPE column in an Oracle Application Server 10.1.3.4 application , all insertions into the XMLTYPE are working except when the length of XML data is greater than 4000 which throws the following exception:


java.sql.SQLException: ORA-1461: can bind a LONG value only for insert into a LONG column

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