您的位置:首页 > 编程语言 > Java开发

Struts整合Hibernate:Could not parse configuration: /hibernate.cfg.xml

2015-06-01 11:16 316 查看
问题现象:加载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”。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: