为了账号安全,请及时绑定邮箱和手机立即绑定

idea新建的springboot工程启动报错

我用的是idea2017UItimake,跟着视频新建一个springboot工程,启动就报错,怎么解决,求解!!

ava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_73]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_73]
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_73]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_73]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_73]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.16.jar:8.5.16]
    ... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5117) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.16.jar:8.5.16]
    ... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.16.jar:8.5.16]
    ... 8 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
    at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1141) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.16.jar:8.5.16]
    ... 10 common frames omitted

2017-08-14 13:30:53.727 ERROR 5760 --- [           main] org.apache.catalina.core.ContainerBase   : A child container failed during start

正在回答

3 回答

将Tomcat 安装目录下 的 servlet-api.jar 复制进 Jdk安装目录下的 /jre/lib/ext 下 问题解决

0 回复 有任何疑惑可以回复我~

tomcat启动失败,1.有个能是tomcat问题,2.jar包冲突

0 回复 有任何疑惑可以回复我~

java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;

找不到该方法,先看jar有没有导入 再看是不是jar冲突

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
2小时学会Spring Boot
  • 参与学习       151599    人
  • 解答问题       1079    个

Spring Boot入门视频教程,你将学会使用Spring Boot快速构建应用程序

进入课程

idea新建的springboot工程启动报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信