-
1. Re: Mapping of Oracle REF CURSOR in standardjbosscmp-jdbc.xm
roist Mar 7, 2007 11:16 AM (in response to rkhurana)if you are using the PreparedStatement or CallableStatement-interface to do so, all you have to do is
// Cursor = -10
cs.registerOutParameter (x, OracleTypes.Cursor );
cs.execute();
ResultSet rs = (ResultSet)cs.getObject(x); -
2. Re: Mapping of Oracle REF CURSOR in standardjbosscmp-jdbc.xm
sirji Aug 23, 2007 2:33 PM (in response to rkhurana)Hi all,
We are using JBoss 4.0.5 and Oracle 9i. and have exactly similar scenario where we are getting the connection object through Data source lookup and executing a stored procedure have ref cursor.
We are also getting following error:-
java.lang.ClassCastException: $Proxy2
Code snippet:
boolean success = stmt.execute();
ResultSet rsRawData = ((OracleCallableStatement)stmt).getCursor(7);
OR
boolean success = stmt.execute();
ResultSet rsRawData = ((ResultSet)stmt).getCursor(7);
But if we don't use JBoss datasource and create a connection using DriverManager then it works perfectly fine.
Any assistance on this will be helpful.