Element type "property" must be followed by either attribute specifications, ">"


Caused by: org.dom4j.DocumentException: Error on line 15 of document  : Element type "property" must be followed by either attribute specifications, ">" or "/>". Nested exception: Element type "property" must be followed by either attribute specifications, ">" or "/>".
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:532)
... 40 more

hibernate配置出现问题,而property节点又却是没问题,出现这样的问题,是因为对应的*.hbm.xml文件中字段与数据库字段名不一致或者字符什么的问题,仔细检查一下,我的问题是
<property name="address" column="adrress" type="string"/>
column与数据库中的字段名不一致造成的。

猜你喜欢

转载自smileon.iteye.com/blog/1100820
今日推荐