首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

eclipse的出错:The markup in the document preceding the root element

2014-01-26 
以下是我的eclipse的出错信息INFO: Mapping resource: com/jeffrey/messagelove/User.hbm.xmlApr 25, 2005

以下是我的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>
          

热点排行