課程
/后端開發
/Java
/Hibernate初探之單表映射
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
2016-12-28
源自:Hibernate初探之單表映射 1-7
正在回答
問題現象:加載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”。
舉報
Java持久化框架Hibernate入門教程,掌握Hibernate基本概念
1 回答單元測試出現這種情況是什么原因呢
3 回答這是怎么個情況?啊
1 回答這是什么情況
2 回答INFO: HHH000041: Configured SessionFactory: null這是什么情況呢
3 回答這問題怎么解決
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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”。