Element type "property" must be followed by either attribute specifications, ">" or "/>"
2014-10-09 10:57
676 查看
Caused by: org.hibernate.InvalidMappingException: Unable to read XML
at org.hibernate.util.xml.MappingReader.readMappingDocument(MappingReader.java:101)
at org.hibernate.cfg.Configuration.add(Configuration.java:513)
at org.hibernate.cfg.Configuration.add(Configuration.java:509)
at org.hibernate.cfg.Configuration.add(Configuration.java:716)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:801)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2344)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2310)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2290)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2243)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
at com.pear.zcp.Util.HirFactory.<clinit>(HirFactory.java:11)
... 24 more
Caused by: org.dom4j.DocumentException: Error on line 10 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.util.xml.MappingReader.readMappingDocument(MappingReader.java:75)
... 35 more
at org.hibernate.util.xml.MappingReader.readMappingDocument(MappingReader.java:101)
at org.hibernate.cfg.Configuration.add(Configuration.java:513)
at org.hibernate.cfg.Configuration.add(Configuration.java:509)
at org.hibernate.cfg.Configuration.add(Configuration.java:716)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:801)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2344)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2310)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2290)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2243)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
at com.pear.zcp.Util.HirFactory.<clinit>(HirFactory.java:11)
... 24 more
Caused by: org.dom4j.DocumentException: Error on line 10 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.util.xml.MappingReader.readMappingDocument(MappingReader.java:75)
... 35 more
一开始以为是标签有用错的地方,是否没有闭合。检查没有问题。 又检查映射关系是否正确。检查也没有问题。 最后在一个标签处发现。标签没有自动提示属性等信息。标签里可能含有隐藏的xml无法解析的字符。删掉标签重新写之后。就没有在报错了。错误比较隐秘。
相关文章推荐
- Element type "Resource" must be followed by either attribute specifications, ">" or "/>".
- Element type "import" must be followed by either attribute specifications, ">" or "/>".
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- org.xml.sax.SAXParseException: Element type "beans" must be followed by either attribute specifications, ">" or "/>".
- 【解决】Element type "typename" must be followed by either attribute specifications, ">" or "/>".
- Element type "bean" must be followed by either attribute specifications, ">" or "/>".
- Element type "action" must be followed by either attribute specifications, ">" or "/>".
- Element type "bean" must be followed by either attribute specifications, ">" or "/>".
- Element type "Resource" must be followed by either attribute specifications, ">" or "/>".
- Element type "Resource" must be followed by either attribute specifications, ">" or "/>".
- Element type"" must be followed by either attribute specifications, ">"
- Element type "bean" must be followed by either attribute specifications, ">"
- 出现错误 Element type "LinearLayout" must be followed by either attribute specification,">"or"/>"的解决办法
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- XML2JSON 的【net.sf.json.JSONException: nu.xom.ParsingException must be followed by either attribute specifications, ">" or "/>"】问题解决办法
- Attribute name "aphmodel" associated with an element type "mxg" must be followed by the ' = ' charac
- 解决Matlab中load一个mat文件时出现The element type "name" must be terminated by the matching end-tag "</name>"的
- MATLAB7.0安装后显示The element type "name" must be terminated by the matching end-tag "</name>".