My Oracle Support Banner

ORA-17270 When Inserting a LOB (Doc ID 1985465.1)

Last updated on AUGUST 01, 2019

Applies to:

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

Symptoms

On :  11.2.0.4.0 version, Thin JDBC driver, following upgrade from 10.2.0.4 driver connecting to 11.2.0.4 database,

ORA-17270 when inserting on a table with BLOB.

Updating the JDBC driver to 11.2.0.4 we get ORA-17270.

This error did not happen with older JDBC drivers.

In the following example table "mytable" contains 2 BLOB columns which are column5 and column6: 

org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: could not insert: [....]; uncategorized SQLException for SQL [insert into mytable (column1, column2, column3, column4, column5, column6, column7, column8, column9, column10, column11, column12, column13, column14, column15) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [99999]; error code [17270]; Duplicate Stream Parameter: 6;

...
Caused by: java.sql.SQLException: Duplicate Stream Parameter: 6
       at oracle.jdbc.driver.OraclePreparedStatement.checkUserStreamForDuplicates(OraclePreparedStatement.java:7967)
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamInternal(OraclePreparedStatement.java:8001)
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamInternal(OraclePreparedStatement.java:7945)
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStream(OraclePreparedStatement.java:7937)
       at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBinaryStream(OraclePreparedStatementWrapper.java:634)

 

NOTE: In the example above, the sample represent a fictitious sample.  Any similarity to actual use case is purely coincidental and not intended in any manner.

 

 

 

 

 

 

 

 

Changes

 The JDBC 11.2 implementation of this feature is substantially different from previous versions of JDBC.  Namely the OraclePreparedStatement.checkUserStreamForDuplicates did not exist in previous JDBC versions and seemingly allowed the duplicate streams to be used.

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


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