Re: ProcedureQuery Problem

From: Marie Goutièr (sweetylol..otmail.com)
Date: Thu Mar 23 2006 - 03:31:21 EST

  • Next message: Andrus Adamchik: "Release update"

    Thanks for this quick answer !!!
    my fault for the forum.
    I'll change if I've new questions !!

    Marie

    >From: Andrus Adamchik <andru..bjectstyle.org>
    >Reply-To: cayenne-de..ncubator.apache.org
    >To: cayenne-de..ncubator.apache.org
    >Subject: Re: ProcedureQuery Problem
    >Date: Thu, 23 Mar 2006 09:00:44 +0300
    >
    >Hi Marie,
    >
    >this is an error on the Oracle end, so either Oracle can't find the
    >procedure or there are errors in the procedure PL/SQL syntax itself. From
    >past experience I know that PL/SQL messages can be very hard to decipher.
    >First thing to try is to run the procedure from SQLPlus and see if it
    >works.
    >
    >Cheers,
    >Andrus
    >
    >P.S. This maybe more of a question for cayenne-user list.
    >
    >
    >
    >On Mar 22, 2006, at 8:11 PM, Marie Goutière wrote:
    >
    >>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 : Thu Mar 23 2006 - 03:31:51 EST