Hi all,
am new ti hibernate. When i try to call stored procedure from java file i got an exception
the following is the calling stored procedure in hbm.xml file...
session = HibernateSession.getSession();
t = session.beginTransaction();
Query query = session.getNamedQuery("userselect_sp");
List list = query.list();
System.out.println(list.size());
in hbm.xml file
<sql-query name="userselect_sp">
{? = call sp_select_pro()}
</sql-query>
am getting an error
org.hibernate.QueryException: Expected positional parameter count: 1, actual parameters: [] [{? = call sp_select_pro()}]
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:118)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:133)
at com.hiber.first.QueryChecking.main(QueryChecking.java:27)
Exception in thread "main" org.hibernate.QueryException: Expected positional parameter count: 1, actual parameters: [] [
{? = call sp_select_pro()}
]
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:118)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:133)
at com.hiber.first.QueryChecking.main(QueryChecking.java:27)
help to sort out this problem...
thanks in advance...
regards
parthiban[/quote][/code]
|