1. 程式人生 > >元素型別為 "session-factory" 的內容必須匹配 "(property*,mapping*,(class-cach....解決方法

元素型別為 "session-factory" 的內容必須匹配 "(property*,mapping*,(class-cach....解決方法

問題:property*,mapping*,(class-cache|collection-cache)*,event*,listener*)

解決的方法:

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" />



這樣調整一下 就可以了