org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
代码是在JDK1.7中写的,部署在JDK1.8环境中就报这个错误。在maven中改成1.8编译也不可以,最后在pom文件中加入
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
重新编译 发版就ok了。
本文介绍了一个关于org.xml.sax.SAXNotRecognizedException的具体案例,在将代码从JDK1.7迁移到JDK1.8的过程中遇到的问题及解决方案。通过在maven项目的pom文件中引入特定版本的xercesImpl依赖来解决。
1095





