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