The content of element type "session-factory" must match "(property*,mapping*,(class-cache| c
2017-02-27 12:10
519 查看
配置hibernate.cfg.xml时提示The content of element type "session-factory" must match "(property*,mapping*,(class-cache|
collection-cache)*,event*,listener*)".的错。
提示先配置property*元素,再配置mapping*元素,依次类推,仔细检查下看看你的程序中是否存在配置顺序错乱的情况。
只是因为在
<hibernate-configuration>
<session-factory>
</session-factory>
</hibernate-configuration>
之间存在元素配置顺序的错误,只需要按提示将顺序调整正确即可。
相关文章推荐
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collectio
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache| collect
- hibernate The content of element type "session-factory" must match "(property*,mapping*,(class-cache
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache| collect
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collectio
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collectio
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collectio
- Hibernate配置文件报错:The content of element type "session-factory" must match "(property*,mapping*,(c
- The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tupli
- The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tupli
- The content of element type "hibernate-configuration" must match "(session-factory,security?)
- The content of element type "hibernate-mapping" must match "(meta*,typedef*,import*,(class|subclass|
- "org.xml.sax.SAXParseException: The content of element type "class" must match" 异常解决
- The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
- 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
- 项目启动报错 content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,...)"
- The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*| ins
- The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
- hibernate.cfg.xml出错:The content of element type "property" must match "(meta*,(column|formula)*
- hibernate.cfg.xml出错:The content of element type "property" must match "(meta*,(column|formula)*