sqlmap文件在tomcat7中运行报错原因及

sqlmap在eclipse中运行,好好的。放到tomcat7中抛出如下异常:

Caused by: java.lang.RuntimeException: Error occurred.  Cause: com.ibatis.common
.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Er
ror parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: com.ibatis.common.xml.NodeletE
xception: Error parsing XML.  Cause: org.xml.sax.SAXParseException: The string "
--" is not permitted within comments.

解决方法:去掉全部的sqlmap文件注释。

另外sqlmap中出现了特殊符号:

sqlmap文件在tomcat7中运行报错原因及<![CDATA[  ]]>
<select id="selectPartsInfoToCar"  resultMap="TblSpPartsinfoResultMap" parameterClass="map">
        <![CDATA[
        SELECT tbl.* FROM `tbl_sp_partsinfo` tbl
        join `jnt_sp_partsinfocar` jnt
        on tbl.id = jnt.f_partsinfo_id and jnt.f_carbrand_id = #fCarbrandId# 
        and jnt.f_carsn_id = #fCarsnId# 
        and jnt.f_caroutput_id = #fCaroutputId# 
        and jnt.f_caryear_id = #fCaryearId#
        order by tbl.created_date desc
        ]]>
    </select> 
sqlmap文件在tomcat7中运行报错原因及<![CDATA[  ]]>

需要加上<![CDATA[  ]]>

sqlmap文件在tomcat7中运行报错原因及<![CDATA[ ]]>

上一篇:SQL 两个表格交互,字符串合并,并且摒除相同的字符串


下一篇:Oracle 连接 Visual Studio 的工具