Hi,
I am trying to call a ORACLE stored Procedure using hibernate. Following code i have written to call the stored procedure in java:
Integer lResult = 0; SessionFactory sessionFactory = this.hibernateTemplate.getSessionFactory(); final SQLQuery sqlQuery = (SQLQuery) sessionFactory.getCurrentSession() .getNamedQuery(AutobulkDAOImpl.BULK_UPLOAD_CLEANSE); //sqlQuery.setParameter("arg1", userId); sqlQuery.setLong(1, userId); List list = sqlQuery.list(); if (null != list && list.size() > 0) { lResult = list.indexOf(0); }
Below is my hbm.xml file declaration for the stored procedure::
<sql-query name="BULK_UPLOAD_CLEANSE" callable="true"> <return-scalar column="p_count" type="integer"/> {call BULK_UPLOAD_CLEANSE(?,?)} </sql-query>
I am getting the below error::
21:10:38,124 ERROR [STDERR] Dec 29, 2009 9:10:38 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Application has thrown exception, unwinding now: java.lang.ArrayStoreException: null 21:10:38,187 ERROR [STDERR] Dec 29, 2009 9:10:38 PM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
And this error is coming on line : List list = sqlQuery.list();
Can anyone help me out in this problem.
Regards, Debapriya
when its trying to execute the line
|