报错:
org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/minashop/entity/User.hbm.xml
.......
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
......
Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
........
检查发现配置文件:
<!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://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
原因:上面的dtd会连接到hibernate官网进行验证,因此断网的话就会报错
浙公网安备 33010602011771号