Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at 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 (系统找不到指定的路径。) Nested exception: c:\ajar\hibernate-configuration-3.0.dtd (系统找不到指定的路径。)
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
... 3 more
这里是在咱们的hibernate.cfg.xml中写在文件头的 DOCTYPE中 这里说明当hibernate运行时候 即new Configuration的时候 hibernate这个框架会 进行XML文档的校验 其实 STRUTS也一样