引用
在hibernate 4.1下用myeclipse 生成的xx.hbm.xml文件中的头部,在最后面多了一个空格
即能解决此问题
< !DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd ">
把这个空格去除:< !DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
即能解决此问题
Caused by: org.dom4j.DocumentException:
http://www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd%20 Nested exception:
http://www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd%20
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:78)