Call to an Oracle Stored Proc with a BLOB parameter from java fails if file > 32 K

From: Melroy <melroy_drego_at_mlc.com.au>
Date: 5 May 2003 16:55:13 -0700
Message-ID: <d5485443.0305051555.2bbb7c1f_at_posting.google.com>


Hi,

My application calls an oracle java stored proc: .........
conn = ds.getConnection();
cstmt = conn.prepareCall("{? = call lobmanager.savelob(?, ?, ?)}");cstmt.registerOutParameter(1, Types.VARCHAR);

cstmt.setString(3, lob_id);
cstmt.setString(2, token);	
cstmt.setBinaryStream(4, stream, stream.available());	
cstmt.executeQuery();
...........

The Stored proc has the signature:
....
name 'LOBManager.saveLob(java.lang.String, java.lang.String, oracle.sql.BLOB)
return java.lang.String'......

The above code works for smaller (<32K) files, but fails on larger. (It even fails if the Stored proc is empty.)

Any suggestions will be greatly appreciated.

Thanks

Melroy Received on Tue May 06 2003 - 01:55:13 CEST

Original text of this message