-->
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 with stored procedure
PostPosted: Fri Jun 16, 2006 2:14 pm 
Newbie

Joined: Fri Jun 16, 2006 2:03 pm
Posts: 1
I'm trying to execute a stored procedure but encounter this problem when trying to load the mapping.

Any ideas?

Hibernate version: 3.0

Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false">
<class name="edu.suny.sysadm.finance.receiving.dto.ReceivingItemDTO" table="RECEIVING_AVAILABLE_ITEM_V" entity-name="ReceivingAvailableItem">
<id name="id" column="RECEIPT_ITEM_ID" type="java.lang.Integer">
<generator class="sequence">
<param name="sequence">RECEIPT_ITEM_SEQ</param>
</generator>
</id>
<property column="ITEM_TYPE" name="itemType" type="java.lang.Integer"/>
<property column="ORD_ITM_PRIC" name="price" type="java.lang.Double"/>
<property column="ITEM_QUANTITY" name="quantity" type="java.lang.Double"/>
<property column="ITEM_DESC" name="description" type="java.lang.String"/>
<property column="ORD_COV_FAC" name="conversionFactor" type="java.lang.Integer"/>
<property column="COUNTER_INITIALS" name="counterInitials" type="java.lang.String"/>
<property column="ITEM_COMMENT" name="comments" type="java.lang.String"/>
<property column="ITEM_DOC_LINE_NUMBER" name="documentLineNumber" type="java.lang.Integer"/>
<property column="SPECIAL_REVIEW_ID" name="specialReviewIdentifier" type="java.lang.Integer"/>
<property column="ITM_UNT_CD" name="selectedUnitIdentifier" type="java.lang.String"/>
<property column="ORD_ITM_UNT_CD" name="orderedUnitIdentifier" type="java.lang.String"/>
<property column="UNSPSC_ID" name="unspscIdentifier" type="java.lang.Integer"/>
</class>
<sql-query name="selectAllAvailableItems" callable="true">
<return class="ReceivingAvailableItem">
<return-property name="id" column="RECEIPT_ITEM_ID"/>
<return-property name="itemType" column="ITEM_TYPE"/>
<return-property name="price" column="PRICE"/>
<return-property name="quantity" column="RECEIVED_QUANTITY"/>
<return-property name="description" column="ITEM_DESCRIPTION"/>
<return-property name="conversionFactor" column="CONVERSION_FACTOR"/>
<return-property name="counterInitials" column="COUNTER_INITIALS"/>
<return-property name="comments" column="ITEM_COMMENT"/>
<return-property name="documentLineNumber" column="ITEM_LINE_NUMBER"/>
<return-property name="specialReviewIdentifier" column="SPECIAL_REVIEW_ID"/>
<return-property name="orderedUnitIdentifier" column="ORDERED_UNITS"/>
<return-property name="selectedUnitIdentifier" column="RECEIVED_UNITS"/>
<return-property name="unspscIdentifier" column="UNSPSC_ID"/>
</return>
{ call RECEIPT_AVAILABLE_ITEMS(?,?,?,?) }
</sql-query>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

Query query = session.getNamedQuery("selectAllAvailableItems");
query.setParameter(1,resultSet);
query.setParameter(2,poId);
query.setParameter(3,contractId);
query.setParameter(4,receiptId);

results = query.list();

Full stack trace of any exception that occurs:

Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addXML(Configuration.java:312)
... 15 more
Caused by: org.xml.sax.SAXParseException: <Line 23, Column 52>: XML-0137: (Error) Attribute 'callable' used but not declared.
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:276)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at org.dom4j.io.SAXReader.read(SAXReader.java:334)
at org.dom4j.io.SAXReader.read(SAXReader.java:274)
at org.hibernate.cfg.Configuration.addXML(Configuration.java:311)
... 15 more

Name and version of the database you are using:

Oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.