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
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”。
相关文章推荐
- 二叉排序树Java版
- java 死锁例子及相关讲解
- Java学习笔记之多线程 2
- 【JAVA】使用ZXing生成二维码
- java的事件监听器学习
- 【JAVA】使用ZXing生成嵌套图片的二维码
- 避免Java应用中NullPointerException的技巧和最佳实践
- hadoop2.6.0的eclipse插件编译和设置
- java多线程概念
- Struts2中Session的使用
- Minimum Size Subarray Sum 【leetCode】Java
- 浅析Spring事务传播行为和隔离级别
- java Data、String、Long三种日期类型之间的相互转换
- JDK 环境变量配置 -- Path classpath
- Spring3 MVC 注解
- MyEclipse2014安装jadeclipse插件
- eclipse有时候导入了包,但是还是有红线,找不到
- Java同步块
- 08、Spring_web.xml_DelegatingFilterProxy
- spring aop 最简单的例子。