The string "--" is not permitted within comments.

 

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

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

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

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

-Dfile.encoding=UTF8

这样子就算注释结束符前面不加空格也是可以的。
用eclipse的可以在run或者debug configuration里面添加vm参数。

文章取自http://igiraffe.me/2011/04/ibatis-saxparseexception-encoding-utf8/?replytocom=51

 

posted @ 2012-10-11 15:00  刀口舔蜜  阅读(868)  评论(1)    收藏  举报