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

Last updated on MARCH 04, 2015

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(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)











 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.


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