org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio

时间:2020-11-27 05:21:49

偶尔有一次beyond compare比较部署文件时,发现有一个JSP文件结尾的地方有一大堆空白的二进制符号,当时没有管,就覆盖上去了。

=================背景分割线=================

然后,再过了一段时间,(因为那个JSP比较少用=V=,所才发现)报了上面一个错,我发现报错的文件是A.JSP,于是打开A.JSP,左找右找,

google找到这个文章: http://q358288843.iteye.com/blog/1707183

细想起之前beyond compare的时候那件事,应该记得就是A.JSP了,但是怎么都找不到当时的一大堆空白的二进制符号。还把weblogic的缓存清空了!- - !那可是要重启,重新部署三个应用,每个应用都一大堆类一大堆jar,蛋疼死了

但是还是不行,报错一样 !

--

于是静下心来,决心,把A.JSP分解开来,看是哪里错掉了。

先是头部的JAVA声明,没出错!然后是head部分,没出错!最让人意料之外的是,错误在body里面!然后细看!里面赫然一句:

<%@include file="A1.JSP"%>

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio想起来了,当时beyond compare比较的时候,一大堆空白的二进制符号的文件是A1.JSP,不是A.JSP!因为文件名相似,一时记错了!

然后就把A1.JSP结尾的一大堆空白的二进制符号删除,保存!完美解决~!!!

看来以后真的不能滥用includeorg.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA sectio