标题: 关于hibernate的问题? [打印本页] 作者: 史小兵 时间: 2012-12-7 19:53 标题: 关于hibernate的问题? 自己写了一个hibernate小程序但是老是报 org.xml.sax.SAXParseException: Attribute "xmlns" must be declared for element type "hibernate-configuration".异常!
找了好多地方就是找不到原因,希望哪个高手可以帮忙指点一下!
这是Student:package com.bjsxt.hibernate.model;
-->
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout 显示出来执行时的sql语句-->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<!--<property name="hbm2ddl.auto">update</property>
-->
<mapping resource="com/bjsxt/hibernate/model/Student.hbm.xml"/>
<mapping class="com.bjsxt.hibernate.model.Student" />
</session-factory>
</hibernate-configuration>