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.
我感觉是你的配置文件错了
应该是多了一个什么标点或者括号什么的啊
添加回答
举报
0/150
提交
取消