部分内容转载自网络
1、报错:java.lang.IllegalAccessError: class org.xml.sax.helpers.SecuritySupport12 cannot access its superclass org.xml.sax.helpers.SecuritySupport
原因:能够正常部分部署在Tomcat6上的程序,部署到Tomcat7上时,会报该错误。
解决办法:
Please add metadata-complete="true" in your web.xml to override default properties of 3.0 for annotations.
If servlet version is set to 2.4 or an earlier version, the servlet container does not process any annotations.
If the metadata-complete attribute is missing or is set to false, the default value for Servlet 2.5/3.0, and version is set to 2.5/3.0, the servlet container examines the class files of the application for servlet annotations and supports the annotations.
例如:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"
metadata-complete="true"
>