ibatis中SAXParseException异常:The string "--" is not permitted within comments

这个异常是说sqlmap里面的注释不符合规范。

1. 这个问题之前看到过有一种解决方案,就是在注释结束前,也就是“–>”前面加一个英文半角的空格。

2. 今天发现了另外一个解决的方法,就是执行程序的时候加上jvm的参数

-Dfile.encoding=UTF8

这样子就算注释结束符前面不加空格也是可以的。

用eclipse的可以在run或者debug configuration里面添加vm参数。

org.xml.sax.SAXParseException

XML解析异常

由于xml中<!-- 【注释】--> 注释与-->之间没有空格造成xml解析错误

基本上确定是由于注释的空格引起的。

以上摘自 http://blog.csdn.net/free4294/article/details/38681095

(还有可能是乱码造成的)

The string "--" is not permitted within comments的更多相关文章

  1. The string "--" is not permitted within comments【转】

    ibatis中SAXParseException异常:The string "--" is not permitted within comments 这个异常是说sqlmap里面 ...

  2. ibatis项目启动报错The string "--" is not permitted within comments【原】

    该错误主要就是因为xml中<!-- [注释]--> 注释与-->之间没有空格造成xml解析错误 sqlMapConfig.xml内容如下 <?xml version=" ...

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

    sqlmap在eclipse中运行,好好的.放到tomcat7中抛出如下异常: Caused by: java.lang.RuntimeException: Error occurred. Cause ...

  4. 两个关于XML解析报错问题小记

    Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments ...

  5. Ibatis XML 配置文件注释引起错误及解决方案

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcytp35 Ibatis XML 配置文件注释引起错误及解决方案 最近在使用Iba ...

  6. Java异常归纳

      1.使用Tomcat运行“播报哥架构”出现的两大异常 1.1 监听器异常 详细情况:部署好Maven项目,启动TOMCAT提示如下错误 java.lang.ClassNotFoundExcepti ...

  7. jeecg流程梳理学习

    jeecg 流程梳理 角色admin 管理员 fgld学校分管领导 bgs学校办公室 xbld系部领导 xbky系部科员jxky bmld部门领导 发文申请applyUserIdadmin${assi ...

  8. [LeetCode] Remove Comments 移除注释

    Given a C++ program, remove comments from it. The program source is an array where source[i] is the ...

  9. [Swift]LeetCode722. 删除注释 | Remove Comments

    Given a C++ program, remove comments from it. The program source is an array where source[i] is the  ...

随机推荐

  1. 【Gerrit】gerrit server搭建

    Part 1  Gerrit Prerequisites: 1.Java JDK>1.7 2.Git 3.SSH server 4.DB part 2 Set local gerrit serv ...

  2. POJ 2893 M × N Puzzle(树状数组求逆序对)

                                                               M × N Puzzle Time Limit: 4000MS   Memory ...

  3. 使用APC缓存PHP opcode

    1.  关于版本 我的php版本是5.3.10  最开始使用 APC-3.1.8  编译成功,但是 php -m 得不到扩展 , 换成 APC-3.1.9  后解决. 2.  关于配置 apc.cac ...

  4. Firebug在Firefox DevTools 中复活

    英文:Firefox,编译:开源中国 链接:www.oschina.net/news/80230/firebug-lives-on-in-firefox-devtools 技术最前线转注:2016年1 ...

  5. Mabitis 多表查询(一)resultType=“java.util.hashMap”

    1.进行单表查询的时候,xml标签的写法如下 进行多表查询,且无确定返回类型时 xml标签写法如下: <select id="Volume" parameterType=&q ...

  6. knockout 学习实例3 html

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  7. 在word里插入图片,并设置图片的格式

    由于公司业务需要,需要在生成的word里插入图片(公司印章),仔细想了下,还是在word模板里添加一个书签,然后再该书签的位置插入图片,并设置图片的格式方便些: 代码如下: using System; ...

  8. Maven进价:Maven构建错误汇总

    问题:The method of type must override asuperclass? annotation:@Override的原因 办法:项目右键->build path-> ...

  9. (转)AVI文件格式解析+AVI文件解析工具

    AVI文件解析工具下载地址:http://download.csdn.net/detail/zjq634359531/7556659 AVI(Audio Video Interleaved的缩写)是一 ...

  10. SQL%NOTFOUND

    异常相关: 源地址:https://zhidao.baidu.com/question/215737667.html EXCEPTIONwhen others thenrollback;dbms_ou ...