-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: PROBLEM IN CALLING ORACLE STORED PROCEDURE
PostPosted: Wed Dec 30, 2009 1:15 am 
Newbie

Joined: Wed Dec 30, 2009 1:07 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.