hibernate中出现 文档根元素 "hibernate-mapping" 必须匹配 DOCTYPE 根 "hibernate-configuration"

hibernate中出现文档根元素"hibernate-mapping"必须匹配DOCTYPE根"hibernate-configuration"

2013/4/20 20:43:34
id="baidu_clb_slot_iframe_899102_0" src="about:blank" width="650" height="109" vspace="0" hspace="0" allowtransparency="true" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" style="margin: 0px; padding: 0px; border-width: 0px; vertical-align: bottom; display: block;">

 

 

 

hibernate中出现 文档根元素 "hibernate-mapping" 必须匹配 DOCTYPE 根 "hibernate-configuration"

又是各种错误!

网上查资料发现这是因为hibernate.xml和我的customer.hbm.xml中的表头原因 这两个的表头不是一样的,

有细微差别

所以应该改为

这是hibernate.xml

 

 configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">    org.hibernate.dialect.MySQLDialect  com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/test root java true update   

 

这里是customer.hbm.xml

 mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >       not-null="true" />  not-null="true" />     

你可能感兴趣的:(hibernate,java,web)