procedure is as below:
CREATE OR REPLACE function selectallfromtest (User_cv OUT SYS_REFCURSOR)
return number
is
ya number;
bEGIN
OPEN User_cv FOR
SELECT * FROM test;
ya := 10;
return ya;
End selectallfromtest ;
java code:
query = ses.getNamedQuery(qId);
List l = query.list();
.hbm.xml file entry is as below :-
<sql-query name="selectallfromtest" callable="true">
{ ? := call selectallfromtest(?)}
</sql-query>
Exception caught:
org.hibernate.QueryException: Not all named parameters have been set: [] [{ ? := call USER_pref_NEW(?)}]
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:284)
at org.hibernate.impl.SQLQueryImpl.verifyParameters(SQLQueryImpl.java:220)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:159)
at com.iflex.fcr.dataSelect.DynamicQueryController.setResultset(DynamicQueryController.java:57)
at com.iflex.fcr.dataSelect.DynamicQueryController.fetchRecords(DynamicQueryController.java:24)
at com.iflex.fcr.dataSelect.TestDataselect.main(TestDataselect.java:35)
java.lang.NullPointerException
at com.iflex.fcr.dataSelect.TestDataselect.main(TestDataselect.java:38)
so my questin is:
how to call a oracle function given above which is havin out as function parameter and returns any value?
help me abt this plz , its urgent........
Thanks and Regards,
Shethap.
|