Cause: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
tomcat报如下错误:
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
网上都说是下面的办法解决:
Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
这个异常很明显是 你xml文件中注释的问题
sqlmap配置文件中。注释只能是<!-- -->
在这其中不能再有--之类的东西。。。如:<!-- 某某--注释 -->这种情况。sqlmap加载配置时,会报错 。
最后发现是jdk版本的问题,我们的工程只能用jdk1.5
结果别人装的时候,jdk1.6没有卸载,就按照了1.5,查看jdk版本的时候还是1.6.
把1.6卸载就好了。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。