如何解决这类问题:The string "--" is not permitted within comments.
2014-08-19 14:20
555 查看
ibatis中SAXParseException异常:The string “–” is not permitted within comments
这个异常是说sqlmap里面的注释不符合规范。
1. 这个问题之前看到过有一种解决方案,就是在注释结束前,也就是“–>”前面加一个英文半角的空格。
2. 今天发现了另外一个解决的方法,就是执行程序的时候加上jvm的参数
这样子就算注释结束符前面不加空格也是可以的。
用eclipse的可以在run或者debug configuration里面添加vm参数。
org.xml.sax.SAXParseException
XML解析异常
由于xml中<!-- 【注释】--> 注释与-->之间没有空格造成xml解析错误
基本上确定是由于注释的空格引起的。
这个异常是说sqlmap里面的注释不符合规范。
1. 这个问题之前看到过有一种解决方案,就是在注释结束前,也就是“–>”前面加一个英文半角的空格。
2. 今天发现了另外一个解决的方法,就是执行程序的时候加上jvm的参数
-Dfile.encoding=UTF8
这样子就算注释结束符前面不加空格也是可以的。
用eclipse的可以在run或者debug configuration里面添加vm参数。
org.xml.sax.SAXParseException
XML解析异常
由于xml中<!-- 【注释】--> 注释与-->之间没有空格造成xml解析错误
基本上确定是由于注释的空格引起的。
相关文章推荐
- 如何解决这类问题:The string "--" is not permitted within comments.
- The string "--" is not permitted within comments.问题解决
- Cause: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
- org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
- weblogic部署异常—org.xml.sax.SAXParseException: The string "--" is not permitted within comments
- The string "--" is not permitted within comments.
- 错误提示-ibatisorg.xml.sax.SAXParseException: The string "--" is not permitted within comments.
- The string "--" is not permitted within comments.
- Cause: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
- The string "--" is not permitted within comments.
- (上一篇的问题解决后又遇到的新问题)在eclipse中导入工程后运行任意文件出现"The selection is not within a valid module"
- The string "--" is not permitted within comments
- 问题解决: Attribute value request.getParameter("id") is quoted with " which must be escaped when used within the value
- "The requested resource (... processLogin.action) is not available"的问题所在及解决办法
- Attribute value is quoted with " which must be escaped when used within the value 问题解决
- windbg中"Your debugger is not using the correct symbols"问题解决方法
- FAQ(24):Mybatis,映射文件,The string "--" is not permitted within com
- "this class is not key value coding-compliant for the key ..."问题的解决
- "this class is not key value coding-compliant for the key ..."问题的解决(转)
- Attribute value is quoted with " which must be escaped when used within the value 问题解决