Chinaunix首页 | 论坛 | 博客
  • 博客访问: 47456
  • 博文数量: 11
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-29 10:18
文章分类

全部博文(11)

文章存档

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

  指出错误:,去掉一个分号,问题解决。

阅读(4115) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-10-31 17:00:07

Content is not allowed in prolog.