ProcedureQuery Problem

From: Marie Goutièr (sweetylol..otmail.com)
Date: Wed Mar 22 2006 - 12:11:14 EST

  • Next message: Andrus Adamchik: "Re: ProcedureQuery Problem"

    Hello I'm beginner with Cayenne and I've a little problem with a
    ProcedureQuery.

    In my Java class I've this part of code :
    ProcedureQuery query = new ProcedureQuery("GETLASTVALBR");
    query.addParameter("idDevice", deviceId);
    query.addParameter("codeMcoEnt", codeMco);
    query.addParameter("dateQuestionBR", dateReview);
    query.addParameter("codeForecast", forecastNum);
    where all parameters are String.

    My map.xml is well mached as you can see :
    <procedure name="GETLASTVALBR" schema="DEVICE" returningValue="true">
    <procedure-parameter name="valBr" type="DECIMAL" direction="out"/>
    <procedure-parameter name="idDevice" type="VARCHAR" length="10"
    direction="in"/>
    <procedure-parameter name="codeMcoEnt" type="VARCHAR" length="2"
    direction="in"/>
    <procedure-parameter name="dateQuestionBR" type="VARCHAR" length="7"
    direction="in"/>
    <procedure-parameter name="codeForecast" type="VARCHAR" length="10"
    direction="in"/>
    </procedure>

    and the PL/SQL procedure on ORACLE DATABASED is declared like that :

    CREATE OR REPLACE PROCEDURE GETLASTVALBR (
    valBr IN OUT NUMBER,
    idDevice IN varchar2,
    codeMcoEnt IN varchar2,
    dateQuestionBR IN varchar2,
    codeForecast IN varchar2) IS......

    But I've got a problem in my TomcatLogs as you can see below :

    QueryLogger: {? = call DEVICE.GETLASTVALBR(?, ?, ?, ?)} [bind: '[OUT]',
    'NA475', '2', '01/02/2004', '23']
    DGCT INFO [http-8080-Processor3 03-22 17:56:48] QueryLogger: *** error.
    java.sql.SQLException: ORA-06550: line 1, column 20:
    PLS-00302: component 'GETLASTVALBR' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    I don't know why it doesn't work..... :'(
    The Oracle schema is ok ...
    I really need some help

    Thanks a lot
    Marie



    This archive was generated by hypermail 2.0.0 : Wed Mar 22 2006 - 12:11:38 EST