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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值