-->
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: Calling PLSQL function
PostPosted: Fri Aug 31, 2007 12:33 pm 
Newbie

Joined: Thu Jul 05, 2007 9:16 am
Posts: 4
Version 3.1.3



My DBA created a "PLSQL Function that I am supposed to call". This function accepts 2 varchars and returns nothing.

("BEGIN yx.packagename.handle_file(??); END;")


Mapping file inside a class element.
<sql-query name="insertCategory" callable="true">
{ call yx.packagename.handle_file(?, ?) }
</sql-query>


BO that extends HibernateTemplate
...
Query foo = this.getSession().getNamedQuery("com.xxx.xxxxxx.insertCategory");
foo.setString(0, "one");
foo.setString(1, "two");
foo.list();


Error:
Hibernate: { dw.alm_file_transfer.push_a_file(?, ?) }
2007-08-31 11:24:09,239 WARN JDBCExceptionReporter SQL Error: 17034, SQLState: null [from: org.hibernate.util.JDBCExceptionReporter]
2007-08-31 11:24:09,239 ERROR JDBCExceptionReporter Non supported SQL92 token at position: 4: dw [from: org.hibernate.util.JDBCExceptionReporter]
2007-08-31 11:24:09,364 INFO xxxxxxxx xxxxxxxx.endTransaction: Transaction (for key transactionManager) rolled back



Question: I am unable to do a straight execute on the Query object. The IDE states that it only works for HQL. So I am returning a list in which I think that is where things are getting screwed up.

How can one call a function that does not return a value in this scenario?


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.