org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml 错误
struts2和hibernate整合,之前运行没问题,今早运行就报错了。错误代码如下:exceptionorg.hibernate.HibernateException...
struts2和hibernate整合,之前运行没问题,今早运行就报错了。错误代码如下:
exception org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2100)
org.hibernate.cfg.Configuration.configure(Configuration.java:2012)
org.hibernate.cfg.Configuration.configure(Configuration.java:1991)
com.test.first.DAO.StudentMapDao.addStudent(StudentMapDao.java:20)
com.test.first.action.FirstSturts.add(FirstSturts.java:45)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .............
root cause org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
org.dom4j.io.SAXReader.read(SAXReader.java:484)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2092)
org.hibernate.cfg.Configuration.configure(Configuration.java:2012)
.............
hibernate.cfg.xml文件已多次检查,没有发现问题 展开
exception org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2100)
org.hibernate.cfg.Configuration.configure(Configuration.java:2012)
org.hibernate.cfg.Configuration.configure(Configuration.java:1991)
com.test.first.DAO.StudentMapDao.addStudent(StudentMapDao.java:20)
com.test.first.action.FirstSturts.add(FirstSturts.java:45)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .............
root cause org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
org.dom4j.io.SAXReader.read(SAXReader.java:484)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2092)
org.hibernate.cfg.Configuration.configure(Configuration.java:2012)
.............
hibernate.cfg.xml文件已多次检查,没有发现问题 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询