1,Hibernate 3.6.0 的XML的头:
<!– hibernate.cfg.xml文件 –>
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD 3.0//EN”
“http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd”>
<!– hbm.xml文件 –>
<!DOCTYPE hibernate-mapping PUBLIC
“-//Hibernate/Hibernate Mapping DTD 3.0//EN”
“http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd”>
<!– hbm.xml文件中也可以使用这个 –>
<!doctype hibernate-mapping public
“-//hibernate/hibernate mapping dtd 3.0//en”
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”>
2,Hibernate 3.3.1 的XML的头:
<!– hibernate.cfg.xml文件 –>
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”>
<!– hbm.xml文件 –>
<!DOCTYPE hibernate-mapping PUBLIC
“-//Hibernate/Hibernate Mapping DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”>
Caused by: org.hibernate.HibernateException: Could not parse configuration: file:/E:/workspace/ItcastOA/WebRoot/WEB-INF/classes/hibernate.cfg.xml