|
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
|