请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师。tomcat启动时,报了org.apache.catalina.LifecycleException。希望老师能帮助一下

org.apache.catalina.LifecycleException:Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/helloworld2]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@2976d18d]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4907)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5042)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 10 more

Caused by: java.lang.IllegalArgumentException: The main resource set specified [D:\javaWeb教程\firstWeb1\webContent] is not valid

at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)

at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 13 more


七月 08, 2018 6:36:08 下午 org.apache.catalina.startup.HostConfig deployDescriptor

严重: Error deploying configuration descriptor [D:\websoftware\apache-tomcat-8.5.31\conf\Catalina\localhost\helloworld2.xml]

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/helloworld2]]

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:748)


正在回答

1回答

同学好,遇到这样的问题,一般我们只看cause by 附近的错误,这里是The main resource set specified [D:\javaWeb教程\firstWeb1\webContent] is not valid 然后百度一下相关的关键字,就能找到相关解决方案,我这里是

https://blog.csdn.net/weixin_40430283/article/details/80201622

此外,同学得确保你的本地maven已经安装配置好,并且和eclipse已经调通,如下图

https://img1.sycdn.imooc.com//szimg/5b42d4390001989014041066.jpg

连接好之后,可以到截图里的repository目录下把相关jar全清除了,然后maven update project重新下载下jar包。环境是个棘手问题并且也是入门的关键,必须得攻克


0 回复 有任何疑惑可以回复我~
  • 提问者 慕少3024258 #1
    谢谢老师,maven update之后就好了
    回复 有任何疑惑可以回复我~ 2018-07-09 11:31:46
  • 提问者 慕少3024258 #2
    我在eclipse外边启动了tomcat,发现在外边启动有相同的问题,我就换了一个tomcat,重新部署了一下。然后遇到了 src/test/resource  这个编译后的文件输出问题,后来 maven update就好了,感谢老师了。
    回复 有任何疑惑可以回复我~ 2018-07-09 11:38:52
  • 已解决,感谢老师!
    回复 有任何疑惑可以回复我~ 2018-12-09 13:24:29
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信