-->
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 in named query
PostPosted: Mon Jul 14, 2008 4:12 am 
Newbie

Joined: Wed Apr 30, 2008 4:46 am
Posts: 8
Hi all,

Please help me with the below problem. Im getting an exception while calling a stored procedure which returns a varchar variable put in a result set. The procedure has got only one OUT parameter and that is the first parameter also.

Hibernate version: 3.2.6

Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Apr 24, 2008 3:10:05 PM by Hibernate Tools 3.1.0.beta4 -->
<hibernate-mapping>
<sql-query name="updateStatus" callable="true">
<return alias="spReturn" class="test.SPUpdateStatusReturn">
   <return-property name="updateStatusRetVal" column="ln_out_parameter"/>
</return>
{call spUpdateStatus(?,?,?,?,?,?,?,?,?) }
</sql-query>
</hibernate-mapping>


Code:
package test;

public class SPUpdateStatusReturn {
    //Fields
    private String updateStatusRetVal;

    public String getUpdateStatusRetVal() {
        return updateStatusRetVal;
    }

    public void setUpdateStatusRetVal(String updateStatusRetVal) {
        this.updateStatusRetVal = updateStatusRetVal;
    }
}


Full stack trace of any exception that occurs:
Code:
Exception in thread "main" org.hibernate.HibernateException: Errors in named queries: updateStatus
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
   at com.sysco.mdm.util.SessionFactoryManager.createSessionFactory(SessionFactoryManager.java:29)
   at com.sysco.mdm.util.SessionFactoryManager.getSessionFactory(SessionFactoryManager.java:34)
   at com.sysco.mdm.business.UnitTest.main(UnitTest.java:28)


Name and version of the database you are using: Oracle10g

_________________
thanks,
windy

Well begun is half done.


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.