Hi,

Our system calls an oracle stored procedure that returns a cursor as
an output parameter. The procedure declaration looks like this:

PROCEDURE proc1 (p1 IN number,
p2 IN number,
rs IN OUT t_refcur);

With jDriver JDBC driver we used to declare the output parameter as
OTHER type and then call Statement.getObject and cast the result to
ResultSet:

statement = connection.prepareCall("BEGIN proc1(?,?,?);
END;");
statement.setLong(1, p1);
statement.setLong(2, p2);
statement.registerOutParameter(3, java.sql.Types.OTHER);
statement.execute();
resultSet = (ResultSet) statement.getObject(3);

This worked perfectly well in WLS 6.1 and 8.1 using jDriver.

Since in WLS 8.1 SP3 BEA announced deprication of jDriver and
recommended to use the new Weblogic JDBC Driver Type 4, we tried to
switch to the new driver.

The code above now gives an error about unsupported OTHER type.

In the driver's known issues document BEA tells us that
"Because JDBC does not support a cursor data type, the Oracle driver
returns refcursor output parameters to the application as result sets.
Your application should not include a parameter marker or should not
declare the refcursor output parameter. The driver transparently
converts the refcursor to a result set, which can be retrieved using
getResultSet or getMoreResults"

How ever when we try to do this:

statement = connection.prepareCall("BEGIN proc1(?,?);
END;");
statement.setLong(1, p1);
statement.setLong(2, p2);
statement.execute();
resultSetHeader = statement.getResultSet();

We get "PLS-00306: wrong number or types of arguments in call to
'PROC1'" error from Oracle

If we try to leave the parameter mark but not declare output
parameter, we get java.sql.SQLException: "[BEA][Oracle JDBC
Driver]Invalid parameter
binding(s)"

Have anyone has made this work?

Thank you,
Alex