hibernate学习中的第一个程序
请大家帮忙看看如何解决这个问题...
错误信息:
2013-9-10 0:18:51 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
2013-9-10 0:18:51 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.5.Final}
2013-9-10 0:18:51 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
2013-9-10 0:18:51 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
2013-9-10 0:18:51 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
2013-9-10 0:18:51 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
2013-9-10 0:18:51 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
2013-9-10 0:18:51 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/test/hibernate/User.hbm.xml
Exception in thread "main"
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 TestMain.main(TestMain.java:19)
Caused by:
org.dom4j.DocumentException: Error on line 2 of document : The processing instruction target matching "[xX][mM][lL]" is not allowed. Nested exception: The processing instruction target matching "[xX][mM][lL]" is not allowed.