当前位置:
首页 >
SpringBoot项目启动提示:An attempt was made to call the method org.apache.coyote.AbstractProtocol.setAccept
发布时间:2025/3/19
39
豆豆
生活随笔
收集整理的这篇文章主要介绍了
SpringBoot项目启动提示:An attempt was made to call the method org.apache.coyote.AbstractProtocol.setAccept
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
场景
在Eclipse中新建SpringBoot项目后启动项目提示:
具体报错信息如下:
. ____ _ __ _ _/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/ ___)| |_)| | | | | || (_| | ) ) ) )' |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot :: (v2.1.3.RELEASE)2019-03-06 23:21:03.829 INFO 5080 --- [ main] c.e.demo.HelloSpringBootApplication : Starting HelloSpringBootApplication on PC-20180724WIAC with PID 5080 (F:\EcpliseWorkspace\helloSpringBoot\target\classes started by Administrator in F:\EcpliseWorkspace\helloSpringBoot) 2019-03-06 23:21:03.835 INFO 5080 --- [ main] c.e.demo.HelloSpringBootApplication : No active profile set, falling back to default profiles: default 2019-03-06 23:21:05.047 WARN 5080 --- [ main]ConfigServletWebServerApplicationContext : Exception encountered during context initialization -cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable tostart web server; nested exception is java.lang.NoSuchMethodError:org.apache.coyote.AbstractProtocol.setAcceptCount(I)V 2019-03-06 23:21:05.059 INFO 5080 --- [ main]ConditionEvaluationReportLoggingListener :Error starting ApplicationContext. To display the conditions report re-run your application with'debug' enabled. 2019-03-06 23:21:05.066 ERROR 5080 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :*************************** APPLICATION FAILED TO START ***************************Description:An attempt was made to call the method org.apache.coyote.AbstractProtocol.setAcceptCount(I)V butit does not exist. Its class, org.apache.coyote.AbstractProtocol, is available from thefollowing locations:jar:file:/D:/Tomcat7/apache-tomcat-7/lib/tomcat-coyote.jar!/org/apache/coyote/AbstractProtocol.classjar:file:/D:/Maven/maven-repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.16/tomcat-embed-core-9.0.16.jar!/org/apache/coyote/AbstractProtocol.classIt was loaded from the following location:解决
这是因为给项目配置Tomcat了。
右击项目--Build Path--Config Build Path
选择Tomcat,选择Remove--Apply and Close
重新启动项目,不再报错。
总结
以上是生活随笔为你收集整理的SpringBoot项目启动提示:An attempt was made to call the method org.apache.coyote.AbstractProtocol.setAccept的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 新建springBoot项目提示:The
- 下一篇: 访问新建的SpringBoot项目提示: