在执行某个xml文件的时候 报错为
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Continuing ...
虽然会报错 但是却不影响运行结果请问各位有人知道怎么解决这个问题
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Continuing ...
虽然会报错 但是却不影响运行结果请问各位有人知道怎么解决这个问题
解决方案 »
- struts2配置和约定
- 通过URL(xx.action)能修改页面的标签和页面标签的值吗?
- axis客户端调用
- Hibernate struts jdon spring webwork 各个框架的发展前途
- 在JAVA中走Struts框架,怎么实现分页
- hibernate两表查询,求解,高手来帮帮忙啊
- 求??????
- TextField table 等控件的事件添加问题 小女子向各位ggjj请教
- 急救!,tomcat+struts访问cloudscape的问题。
- ****************Rumble in the jungle: J2EE versus .Net********************
- jdbc连接mysql提示java.lang.NoClassDefFoundError怎么回事(我用的lomboz eclipse,jar包已引入)
- Struts2问题
JDK1.6在解析带有中文注释的XML文档时,<!-- 注释 -->是正确的表示方式,<!--注释-->会被JDK1.6认为是错误的标签(而1.5却可以正常识别)。
<?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>
在ibatis手册里面有的, 仔细看看吧, 可能是你想要的问题, 因为我没有遇到过这种问题,所以也只是猜测:通过<![CDATA[……]]>节点,可以避免SQL 中与XML 规范相冲突的字符对
XML映射文件的合法性造成影响。
把sql放在这里面试试吧.