在执行某个xml文件的时候   报错为    
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Continuing ...
    
  
虽然会报错 但是却不影响运行结果请问各位有人知道怎么解决这个问题

解决方案 »

  1.   

    xml解析出错, 你有东西写在了 实体标签之外了,, 仔细找找。或者把配置文件贴出来吧,另外你的异常信息没有帖全吧?
      

  2.   

    LZ用的是JDK1.6
    JDK1.6在解析带有中文注释的XML文档时,<!-- 注释 -->是正确的表示方式,<!--注释-->会被JDK1.6认为是错误的标签(而1.5却可以正常识别)。
      

  3.   

     如果是按照你说的这个原因  那应该会执行不了相应的sql 语句吧  但是实际不影响我的执行只是会保这个警告!
      

  4.   

      这个问题 我知道  在我的xml 中没有任何注释 我贴出来看看吧
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sqlMap
        PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
        "http://www.ibatis.com/dtd/sql-map-2.dtd">
    <sqlMap namespace="Performance">
    <typeAlias alias="scheduleMessage"
    type="com.topvision.ems.facade.domain.ScheduleMessage" />
    <insert id="insertEntity" parameterClass="scheduleMessage">
    INSERT INTO PerfMonitor(
    identifyKey,
    category,
    domain,
    snmpParam,
    initialDelay,
    period,
    scheduleType,
    createTime)
    VALUES (
    #identifyKey#,
    #category#,
    #domainString#,
    #snmpParamString#,
    #initialDelay#,
    #period#,
    #scheduleType#,
    now())
    <selectKey resultClass="long" keyProperty="monitorId">
    SELECT @@IDENTITY AS monitorId
    </selectKey>
    </insert>
    <select id="selectByMap" parameterClass="map" resultClass="scheduleMessage">
    SELECT monitorId,identifyKey,category,domain as domainString,snmpParam
    as snmpParamString,initialDelay,period,scheduleType,createTime from
    PerfMonitor
        </select>
    <select id="selectByPrimaryKey" parameterClass="long"
    resultClass="scheduleMessage">
    select monitorId,identifyKey,category,domain as domainString,snmpParam as
    snmpParamString,initialDelay,period,scheduleType,createTime from
    PerfMonitor where monitorId=#monitorId#
        </select>
    <select id="selectByIdentifyAndCategory" parameterClass="map"
    resultClass="scheduleMessage">
    select monitorId,identifyKey,category,domain as domainString,snmpParam as
    snmpParamString,initialDelay,period,scheduleType,createTime from
    PerfMonitor where identifyKey=#identifyKey# and category=#category#
    </select>
    <update id="updateEntity" parameterClass="scheduleMessage">
    update PerfMonitor set period=#period#,snmpParam=#snmpParamString# where
    monitorId=#monitorId#
        </update>
    <update id="updateScheduleDomain" parameterClass="scheduleMessage">
    update PerfMonitor set domain = #domainString# where monitorId=#monitorId#
    </update>
    <delete id="deleteByPrimaryKey" parameterClass="long">
    delete from PerfMonitor where monitorId=#monitorId#
        </delete>
    </sqlMap>
      
      

  5.   

    不好意思 刚没看到你说不影响执行,,
    在ibatis手册里面有的, 仔细看看吧, 可能是你想要的问题, 因为我没有遇到过这种问题,所以也只是猜测:通过<![CDATA[……]]>节点,可以避免SQL 中与XML 规范相冲突的字符对
    XML映射文件的合法性造成影响。
    把sql放在这里面试试吧.