专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Java Exception

eclipse的出错:The markup in the document preceding the root element must be well-

发布时间:2010-06-05 12:33:59 文章来源:www.iduyao.cn 采编人员:星星草

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

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: