当前位置: 代码迷 >> Eclipse >> eclipse的失误:The markup in the document preceding the root e
  详细解决方案

eclipse的失误:The markup in the document preceding the root e

热度:431   发布时间:2016-04-23 01:53:30.0
eclipse的出错:The markup in the document preceding the root e
点击右边红色标题查看本文完整版:eclipse的出错:The markup in the document preceding the root element must be well-formed

以下是我的eclipse的出错信息
?
? INFO: Mapping resource: com/jeffrey/messagelove/User.hbm.xml
? Apr 25, 2005 4:49:17 PM net.sf.hibernate.util.XMLHelper$ErrorLogger error
? SEVERE: Error parsing XML: XML InputStream(2) The markup in the document preceding the root element must be well-formed.
? Apr 25, 2005 4:49:17 PM net.sf.hibernate.cfg.Configuration addInputStream
? SEVERE: Could not configure datastore from input stream
? org.dom4j.DocumentException: Error on line 2 of document : The markup in the document preceding the root element must be well-formed. Nested exception: The markup in the document preceding the root element must be well-formed.
? at org.dom4j.io.SAXReader.read(SAXReader.java:355)
? at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:287)
? at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:337)
? at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1027)
? at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:983)
? at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:911)
? at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
? at com.jeffrey.messagelove.test.HibernateTest.setUp(HibernateTest.java:29)
? at junit.framework.TestCase.runBare(TestCase.java:125)
? at junit.framework.TestResult$1.protect(TestResult.java:106)
? at junit.framework.TestResult.runProtected(TestResult.java:124)
? at junit.framework.TestResult.run(TestResult.java:109)
? at junit.framework.TestCase.run(TestCase.java:118)
? at junit.framework.TestSuite.runTest(TestSuite.java:208)
? at junit.framework.TestSuite.run(TestSuite.java:203)
? at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
? at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
? at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
? Nested exception:
?
? 不明白什么意思!!!
?
? 以下附上相应配置文件:
? [hibernate.cfg.xml]
?
? <?xml version="1.0" encoding="utf-8"?>
? <!DOCTYPE hibernate-configuration
? PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
? "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
?
? <hibernate-configuration>
? <session-factory>
? <property name="hibernate.connection.url">
? jdbc:jtds:sqlserver://localhost:1433/MessageLove
? </property>
?
? <property name="hibernate.connection.driver_class">
? net.sourceforge.jtds.jdbc.Driver
? </property>
?
? <property name="hibernate.connection.username">
? sa
? </property>
?     

  相关解决方案