I have a stored proc that takes a CLOB is an input parameter. When I try to call that proc via JDBC, I get a "Function sequence error". I've tried setting the autoCommit to false as well as a number of other things with no success.

Here's the code...

CallableStatement l_oStmt = null;
Connection l_oConn = ConnectionFactory.getConn();

l_oStmt = l_oConn.prepareCall("{ ? = CALL EH.SAVE_COMMENT_P(?,?,?) }");
l_oStmt.registerOutParameter(1, Types.INTEGER);
l_oStmt.setInt(2, a_iItemId);
l_oStmt.setInt(3, a_iTypeId);
l_oStmt.setBinaryStream(4, ConversionUtils.toInputStream(l_sComment), l_sComment.length());

while (l_oStmt.getMoreResults() || (l_oStmt.getUpdateCount() != -1) );
l_iReturnCode = l_oStmt.getInt(1);


Another thing that's really throwing me for a loop is that if I add "println"s between every statement, the code seems to choke after the "executeUpdate" (Note: I took out the while and l_iReturnCode statements after the executeUpdate and it still failed after the executeUpdate)