日期:2014-05-19  浏览次数:20689 次

求助!hibernate的映射文件的蛋疼问题...
初学hibernate,映射文件都是用hibernate tool生成的,请问究竟是什么问题?

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [E:\My Code\j2ee\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\DigitalFamily\WEB-INF\classes\config\spring-applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file E:\My Code\j2ee\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Test\WEB-INF\classes\com\test\model\security\Authority.hbm.xml




<?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 2013-1-16 22:46:12 by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping>
    <class name="com.test.model.security.Authority" table="DF_AUTHORITY">
        <id name="id" type="int">
            <column name="[ID]" />
            <generator class="identity" />
        </id>
        <property name="name" type="java.lang.String">
            <column name="[NAME]" />
        </property>
        <property name="desc" type="java.lang.String">
            <column name="[DESC]" />
        </property>
        <property name="status" type="int">
            <column name="[STATUS]" />
        </property>
        <set name="resources" table="RESOURE" inverse="false" lazy="true">
            <key>
                <column name="[RESOURCE_ID]" />
            </key>
            <one-to-many class="com.test.model.security.Resoure" />
        </set>
    </class>
</hibernate-mapping>
hibernate