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: mapping errors -2 ???
PostPosted: Tue Dec 19, 2006 9:27 am 
Newbie

Joined: Tue Dec 19, 2006 9:16 am
Posts: 6
I have the following mapping:

<hibernate-mapping auto-import="true" package="domain" default-access="field">

<resultset name="rec_education">
<return alias="edu" class="domain.Education"/>
</resultset>

<sql-query name="selectListEducation" resultset-ref="rec_education">
<![CDATA[
select
edu.EMPLID as {edu.EMPLID},
edu.EDUCATION_ID as {edu.EDUCATION_ID},
edu.BEGIN_YEAR as {edu.BEGIN_YEAR},
edu.END_YEAR as {edu.END_YEAR},
edu.INSTITUTION as {edu.INSTITUTION},
edu.LOCATION as {edu.LOCATION},
edu.COUNTRY as {edu.COUNTRY},
edu.DEGREE as {edu.DEGREE},
edu.STUDY_FIELD as {edu.STUDY_FIELD},
edu.CHANGEUSER as {edu.CHANGEUSER},
edu.CHANGEDT as {edu.CHANGEDT}
from education edu
order by 2
]]>
</sql-query>

</hibernate-mapping>

And I got the following errors:

[java] 07:44:28,031 ERROR - [util.XMLHelper.error] Error parsing XML: XML InputStream(8) Element type "resultset" must be declared.
[java] 07:44:28,046 ERROR - [util.XMLHelper.error] Error parsing XML: XML I
nputStream(12) Attribute "resultset-ref" must be declared for element type "sql-
query".
[java] 07:44:28,046 ERROR - [util.XMLHelper.error] Error parsing XML: XML I
nputStream(31) The content of element type "hibernate-mapping" must match "(meta
*,typedef*,import*,(class|subclass|joined-subclass|union-subclass)*,(query|sql-q
uery)*,filter-def*)".
[java] org.springframework.beans.factory.BeanCreationException: Error creat
ing bean with name 'hibernate_sessionFactory' defined in file [C:\java_dev\hiber
nate\datasource_beans_teres.xml]: Invocation of init method failed; nested excep
tion is org.hibernate.MappingException: invalid mapping

any idea?

-Henry


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.