My Oracle Support Banner

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

Last updated on AUGUST 09, 2023

Applies to:

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


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

ORA-17270 when inserting on a table with BLOB.

Updating the JDBC driver to 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(
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamInternal(
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamInternal(
       at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStream(
       at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBinaryStream(


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.










 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.


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.