I'm having a lot of trouble making a call to a stored procedure (named
"anketirani"). The procedure takes no parameters and returns a value
(RETURN myvalue; at the end of the Pl/pgSQL procedure).
This is the relevant part of my map file:
<procedure name="anketirani" schema="public" returningValue="true">
<procedure-parameter name="returnValue" type="INTEGER"
direction="out"/>
</procedure>
I call the procedure like so:
ProcedureQuery query = new ProcedureQuery("anketirani");
List performQuery = kontekst.performQuery(query);
The exception along with the interesting part of the stack trace is
pasted below.
After reading the relevant parts of the user manual over and over again,
I'm still at a loss.
Thanks,
Tomislav
org.objectstyle.cayenne.CayenneRuntimeException
[v.1.2M1 November 21 2004] Query exception.
unlabeledMessage: Query exception.
java.sql.SQLException
ERROR: relation "public.anketirani" does not exist
SQLState: 42P01
errorCode: 0
Stack Trace:
* org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
* org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
* org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
* org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:388)
* org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:329)
* org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:320)
* org.objectstyle.cayenne.access.DataNode.runStoredProcedure(DataNode.java:640)
* org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:345)
* org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:654)
* org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1408)
* org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:179)
* org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1366)
* org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1622)
* org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1485)
* netgen.anketa.sucelje.Home.dohvatiSlijedecuOsobu2(Home.java:92)
This archive was generated by hypermail 2.0.0 : Sat Apr 09 2005 - 13:47:31 EDT