My Oracle Support Banner

Error "ORA-17068: Invalid argument(s) in call" Using Method setBinaryStream(0L) in JDBC (Doc ID 1234235.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version: and later   [Release: 11.2 and later ]
Information in this document applies to any platform.


Position 0 is being used in the JDBC Lob functions.  For example, in below code setBinaryStream(0) is getting the OutputStream starting at position 0 from a java.sql.Blob.

OutputStream outputStream;
byte[] mybytes = {1,2,3,4,5,6,7,8,9,10};
PreparedStatement pstmt = pconnection.prepareStatement("select blobke from testblob for update");
ResultSet rset = pstmt.executeQuery();
while (
{ Blob blob = rset.getBlob(1);
  outputStream = blob.setBinaryStream(0L);

This code results in the following error:
ORA-17068: Invalid argument(s) in call

An example stack trace:
java.sql.SQLException: Invalid argument(s) in call
at oracle.jdbc.driver.T4CConnection.newOutputStream(
at oracle.sql.BLOB.setBinaryStream(


upgrade of Oracle JDBC driver to


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.