【Hibernate】配置错误The content of element type "session-factory".......

The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collection-cache)*,event*,listener*)"

出现这样的错误原因很多

不过有一个原因可能是 比喻说这样的

<mapping resource="com/vo/Users.hbm.xml"/>
<mapping resource="com/vo/Utype.hbm.xml"/>
<property name="show_sql">true</property>

把 property写在mapping的下面了

<property name="show_sql">true</property>
<mapping resource="com/vo/Users.hbm.xml"/>
<mapping resource="com/vo/Utype.hbm.xml"/>

这样调整一下 就可以了

posted @ 2011-02-16 17:26  liheping  Views(1179)  Comments(1Edit  收藏  举报