ResultSet with ORACLE Stored Procedure OUT Parameter

From: Pirola Davide (davide.pirol..tin.it)
Date: Fri Jan 14 2005 - 11:25:27 EST

  • Next message: Mike Kienenberger: "Re: Some architecture thoughts and questions (somewhat long...)"

     Hi,
     i'm a new Cayenne's user.
     I have a Oracle stored procedure that return a CURSOR by OUT parmeter.
     With Cayenne Modeler i have generated a datamap xml file:
     
          <procedure name="USERLOGIN" schema="xxxx" catalog="xxxx" returningValue="true">
                     <procedure-parameter name="I_S_USER_ALIAS" type="VARCHAR" direction="in"/>
                    <procedure-parameter name="O_RC_USERINFO" type="OTHER" direction="out"/>
                    <procedure-parameter name="O_N_EXITFLAG" type="DECIMAL" length="22" direction="out"/>
                     <procedure-parameter name="O_S_EXITMSG" type="VARCHAR" direction="out"/>
             </procedure>
     
     O_RC_USERINFO is a REF CURSOR that i want to map to my java Object.
     
     I try to access to stored procedure in that way:
     
     
                    DataContext ctxt = DataContext.createDataContext();>
            ProcedureQuery query = new ProcedureQuery("USERLOGIN");
            query.addParameter("I_S_USER_ALIAS", "smith");
            List outList = ctxt.performQuery(query);
     
     
     when i execute the last line (List outList = ctxt.performQuery(query);) i found that error:
     
     INFO QueryLogger: *** error.
     java.sql.SQLException: Invalid column type
     
     the problem is referred to the "OTHER" type that is associated to my REF CURSOR.
     
     Anyone can help me?
     
     Usually, with JDBC, i use OracleTypes.CURSOR to retrive data from this REF CURSOR.
     Why Cayenne Modeler use "OTHER" type instead?
     
     
     Thank's.
     
     D.
     
     
     
     
     
     
     



    This archive was generated by hypermail 2.0.0 : Fri Jan 14 2005 - 11:24:48 EST