HTTP Status 500 - Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.se

解决 HTTP Status 500 - Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getHttpServletMapping()Ljavax/servlet/http/HttpServletMapping;

HTTP Status 500 - Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getHttpServletMapping()Ljavax/servlet/http/HttpServletMapping;
type Exception report

message Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getHttpServletMapping()Ljavax/servlet/http/HttpServletMapping;

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getHttpServletMapping()Ljavax/servlet/http/HttpServletMapping;
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1076)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getHttpServletMapping()Ljavax/servlet/http/HttpServletMapping;
	org.springframework.web.util.UrlPathHelper.skipServletPathDetermination(UrlPathHelper.java:265)
	org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:250)
	org.springframework.web.util.UrlPathHelper.resolveAndCacheLookupPath(UrlPathHelper.java:199)
	org.springframework.web.servlet.handler.AbstractHandlerMapping.initLookupPath(AbstractHandlerMapping.java:567)
	org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.getHandlerInternal(AbstractUrlHandlerMapping.java:136)
	org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:491)
	org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1255)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1037)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.50 logs.

在这里插入图片描述

在这里插入图片描述
原因:
pom文件中可能有servlet jsp的jar包的依赖 手动改部署tomcat的时候和tomcat自带的jar包有冲突

在这里插入图片描述
解决办法:
在lib中把对应的jar包删除 然后再把out文件下对应工程对应lib文件下jar包删除

在这里插入图片描述
重启服务运行
在这里插入图片描述

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页