2008年(11)
分类: 数据库开发技术
2008-10-11 16:54:34
Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/yzgl/database/User.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1338)
at com.yzgl.database.ExportDB.main(ExportDB.java:10)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:469)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
... 7 more
Caused by: org.dom4j.DocumentException: Error on line 134 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:460)
... 8 more
解决方法:
Caused by: org.dom4j.DocumentException: Error on line 134 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 "/>".
指出错误:,去掉一个分号,问题解决。