为了账号安全,请及时绑定邮箱和手机立即绑定

Unable to read XML || hibernate运行中出现无法读取xml错误如何处理?

Unable to read XML || hibernate运行中出现无法读取xml错误如何处理?

夜阑风语丿 2016-04-13 21:22:58
Exception in thread "main" java.lang.ExceptionInInitializerError at com.imooc.entity.Test.add(Test.java:24) at com.imooc.entity.Test.main(Test.java:13)Caused by: 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:488) at org.hibernate.cfg.Configuration.add(Configuration.java:484) at org.hibernate.cfg.Configuration.add(Configuration.java:657) at org.hibernate.cfg.Configuration.addResource(Configuration.java:740) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2188) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2160) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2140) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2093) at org.hibernate.cfg.Configuration.configure(Configuration.java:2008) at org.hibernate.cfg.Configuration.configure(Configuration.java:1987) at com.imooc.util.HibernateUtil.<clinit>(HibernateUtil.java:15) ... 2 moreCaused by: org.dom4j.DocumentException: Error on line 12 of document  : The value of attribute "type" associated with an element type "null" must not contain the '<' character. Nested exception: The value of attribute "type" associated with an element type "null" must not contain the '<' character. at org.dom4j.io.SAXReader.read(SAXReader.java:482) at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:78) ... 13 more
查看完整描述

1 回答

?
Its_forever

TA贡献361条经验 获得超328个赞

The value of attribute "type" associated with an element type "null" must not contain the '<' character. 

我感觉是你的配置文件错了
应该是多了一个什么标点或者括号什么的啊

查看完整回答
反对 回复 2016-04-13
  • 1 回答
  • 0 关注
  • 3616 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信