hibernate跟一些配置文件有關(guān)的異常
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xmlat org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1414)
at Test.TestDao.main(TestDao.java:21)
Caused by: org.dom4j.DocumentException: c:\ajar\hibernate-configuration-3.0.dtd (系統(tǒng)找不到指定的路徑。) Nested exception: c:\ajar\hibernate-configuration-3.0.dtd (系統(tǒng)找不到指定的路徑。)
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
... 3 more
這里是在咱們的hibernate.cfg.xml中寫(xiě)在文件頭的 DOCTYPE中 這里說(shuō)明當(dāng)hibernate運(yùn)行時(shí)候 即new Configuration的時(shí)候 hibernate這個(gè)框架會(huì) 進(jìn)行XML文檔的校驗(yàn) 其實(shí) STRUTS也一樣
posted on 2009-02-16 17:43 wangjunjie 閱讀(417) 評(píng)論(0) 編輯 收藏