首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

org.xml.sax.SAXParseException: Document root element "hibernate-AnnotationC

2012-01-03 
org.xml.sax.SAXParseException: Document root element hibernate-AnnotationConfigorg.xml.sax.SAXPars

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>

热点排行