-->
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: Error calling stored procedure that doesn't return any value
PostPosted: Tue Jul 07, 2009 12:52 pm 
Newbie

Joined: Tue Jul 07, 2009 12:42 pm
Posts: 1
New to hibernate & Java. I am trying to execute a stored procedure with no parameters that doesn't return any value.
hibernate.hbm.xml
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!-- a bunch of class tags with mappings that work -->
<sql-query name="SP_DeleteOrphanObjectCondition" callable="true">
{ call DeleteOrphanObjectCondition() }
</sql-query>
</hibernate-mapping>

I also tried:
{ ? = call DeleteOrphanObjectCondition() }
with the same result.

I am running:
getHibernateSession().getNamedQuery("SP_DeleteOrphanObjectCondition").uniqueResult();

I get an error:
org.hibernate.MappingException: Named query not known: SP_DeleteOrphanObjectCondition
at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:93)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1287)

Can someone help me with this? Greatly appreciated. Thanks.


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.