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

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 more

Caused 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


夜阑风语丿
浏览 3617回答 1
1回答

Its_forever

The value of attribute "type" associated with an element type "null" must not contain the '<' character. 我感觉是你的配置文件错了应该是多了一个什么标点或者括号什么的啊
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java