这种情况该怎么解决呢
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
2016-12-28
问题现象:加载Hibernate时出现异常,可以看到异常信息:
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
原因:hibernate.cfg.xml中引用了错误的DTD文件路径“http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd”。
解决方法:替换为正确的DTD路径:“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”。
举报