ERROR: HHH000196: Error parsing XML (4) :

前端之家收集整理的这篇文章主要介绍了ERROR: HHH000196: Error parsing XML (4) :前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
ERROR: HHH000196: Error parsing XML (4) : Attribute "not-null" with value "100" must have a value from the list "true false ".
%%%% Error Creating SessionFactory %%%%
org.hibernate.InvalidMappingException: Unable to read XML
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:109)
at org.hibernate.cfg.Configuration.add(Configuration.java:478)
at org.hibernate.cfg.Configuration.add(Configuration.java:474)
at org.hibernate.cfg.Configuration.add(Configuration.java:647)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:730)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2109)

at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2081)

....

Caused by: org.xml.sax.SAXParseException: Attribute "not-null" with value "100" must have a value from the list "true false ".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

...

原因是:Job.hbm.xml中的<property name="contentAction" type="java.lang.String">
<column name="contentAction" not-null="100"/>
</property>

手动添加的字符串的类型写错了;改为<column name="contentAction"length="100"/>

原文链接:https://www.f2er.com/xml/298356.html

猜你在找的XML相关文章