java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache(DefaultInstanceManager.java:342)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:161)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:149)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
使用maven-compiler-plugin运行项目总是报上面的错误,,经过百度,多数是说在maven的pom.xml中给包加上<scope>provided</scope>,,我怎么加都不行,,尝试过不在pom.xml中导包,直接手动导包,,运行项目也是报这个错?这是什么运用呢?
应该是jar包冲突了吧,我看你上面好像有两个不同版本的servlet包
我只引入servlet-api2.5和jsp-api2.0版本也是报上面的错误项目/WEB-INF/lib目录下 jsp-api.jar,el-api.jar,servlet-api.jar要移除
看下运行目录下的项目/WEB-INF/lib目录下有类似jsp-api.jar,el-api.jar,servlet-api.jar包么?检查下依赖,看看其它包是否依赖了jsp相关的包,比如solr。有的话需要exclusion/WEB-INF/lib目录下jsp-/WEB-INF/lib目录下我没有放jsp-api.jar,el-api.jar,servlet-api.jarapi.jar,el-api.jar,servlet-api.jar楼主。问题是否已经解决了,我也遇到了该问题。请问怎么解决的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。