问题描述:Springboot项目
项目无法启动,至上一次启动成功未更改代码,排除代码错误原因,具体报错如下:
可能是项目未关闭完全,又重启了项目等多种原因触发这个问题
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.apache.catalina.authenticator.Authenticatorbase.startInternal(Authenticatorbase.java:1321)
The following method did not exist:
javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
The method's class, javax.servlet.ServletContext, is available from the following locations:
jar:file:/G:/repository/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar!/javax/servlet/ServletContext.class
jar:file:/G:/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/javax/servlet/ServletContext.class
jar:file:/G:/repository/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-api-2.5-6.1.14.jar!/javax/servlet/ServletContext.class
jar:file:/G:/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.35/tomcat-embed-core-9.0.35.jar!/javax/servlet/ServletContext.class
It was loaded from the following location:
file:/G:/repository/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of javax.servlet.ServletContext
解决方案:
看报错信息,去上述几个目录下,把所有冲突的文件删除即可。(如果提示正在使用,可先保存报错信息,先关闭IDEA再进行删除!)



