您的位置:首页 > 编程语言 > Java开发

第一次springboot项目运行出错总结

2019-02-26 14:16 966 查看
以前开发项目,第一反应就是给项目配置jdk,以及tomcat。然而刚接触springboot后,第一个springboot项目一直运行不起来。然后感谢
https://www.geek-share.com/detail/2758981428.html      找到了解决方法,以下是错误
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.3.RELEASE)

2019-02-26 14:06:26.024  INFO 2768 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication on PC-20180725RGPQ with PID 2768 (D:\Downloads\demo\target\classes started by Administrator in D:\Downloads\demo)
2019-02-26 14:06:26.027  INFO 2768 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default
2019-02-26 14:06:27.004  WARN 2768 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: org.apache.coyote.AbstractProtocol.setAcceptCount(I)V
2019-02-26 14:06:27.013  INFO 2768 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-02-26 14:06:27.022 ERROR 2768 --- [           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 but it does not exist. Its class, org.apache.coyote.AbstractProtocol, is available from the following locations:

    jar:file:/E:/MyEclipse2017CI/plugins/com.genuitec.eclipse.server.embedded.tomcat.core_13.0.0.me201612211440/tomcat85/lib/tomcat-coyote.jar!/org/apache/coyote/AbstractProtocol.class
    jar:file:/D:/maven/repo/org/apache/tomcat/embed/tomcat-embed-core/9.0.16/tomcat-embed-core-9.0.16.jar!/org/apache/coyote/AbstractProtocol.class

It was loaded from the following location:

    file:/E:/MyEclipse2017CI/plugins/com.genuitec.eclipse.server.embedded.tomcat.core_13.0.0.me201612211440/tomcat85/lib/tomcat-coyote.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.apache.coyote.AbstractProtocol

将buildpath中的tomcat配置remove掉就好了

 

运行成功

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: