当前位置: 代码迷 >> J2EE >> org.xml.sax.SAXParseException: Document root element "hibernate-AnnotationConfig解决方法
  详细解决方案

org.xml.sax.SAXParseException: Document root element "hibernate-AnnotationConfig解决方法

热度:489   发布时间:2016-04-22 02:55:59.0
org.xml.sax.SAXParseException: Document root element "hibernate-AnnotationConfig
org.xml.sax.SAXParseException: Document root element "hibernate-AnnotationConfiguration", must match DOCTYPE root "hibernate-configuration".

hibernate.cfg.xml配置如下:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-AnnotationConfiguration>

  <session-factory>



求高人赐教!!!!

------解决方案--------------------
Document root element "hibernate-AnnotationConfiguration", must match DOCTYPE root "hibernate-configuration".

 这样试试。
 <hibernate-AnnotationConfiguration>
<hibernate-configuration>

</hibernate-configuration>
 </hibernate-AnnotationConfiguration>
  相关解决方案