网格系统与版式设计:org.hibernate.mappingException:Could not read mappings from resource:

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 10:27:13
帮帮忙看都是那方面错了

那是由于你的hibernate.cfg.xml中指定的映射文件存在语法错误
以Customer.hbm.xml为例仔细检查一下文件
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="Customer" table="CUSTOMER">
<id name="id" column="CID">
<generator class="increment" />
</id>
<property name="username" column="USERNAME" />
<property name="password" column="PASSWORD" />
</class>
</hibernate-mapping>