java 与hibernate问题

来源:百度知道 编辑:UC知道 时间:2024/06/02 11:19:03
HibernateUtil:20 - Initial SessionFactory failed org.hibernate.InvalidMappingException: Could not parse mapping document from resource Student.hbm.xml
<hibernate-mapping>

<class name="Student" table="t_cet">
<id name="id" column="id">
<generator class="increment"/>
</id>
<property column="stu_No" name="stu_No" not-null="true" type="String"/>
<property column="stu_name" name="stu_name" not-null="true" type="string"/>
<property column="stu_id" name="stu_id" not-null="true" type="integer"/>
<property column="stu_sex" name="stu_sex" not-null="true" type="String"/>
<property column="stu_grade" name="stu_grade" not-null=

Student.hbm.xml文件里面有语法问题吧,无法解析它。

Student.hbm.xml 映射文件有问题!好好检查下这个文件!

Could not parse mapping document from resource Student.hbm.xml

不能解析映射文件Student.hbm.xml

希望我的回答对你有帮助!

不能映射Student.hbm.xml

要在hibernate.cfg.xml文件中要配置映射到Student.hbm.xml的mapping