java项目部署到tomcat启动时报错java.lang.IllegalAccessError: cl org.xml.sax.helpers.SecuritySupport12 cannotass

来源:互联网 发布:广数g72内孔编程实例 编辑:程序博客网 时间:2024/05/18 01:12
Please addmetadata-complete="true" in yourweb.xml to override default properties of 3.0 for annotations.

    The metadata-complete attribute of the web-app element in a Web application's deployment descriptor specifies whether the Web descriptor and other related deployment descriptors for this module (such as Web service descriptors) are complete
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">
0 0