Java Tomcat v7.0 服务器启动失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32837857/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 13:11:30  来源:igfitidea点击:

Tomcat v7.0 server failed to start

javaeclipsetomcattomcat7

提问by Ivar Reukers

So, I'm trying to work with a tomcat v7.0 server. I have already worked with a tomcat v8.0 server but because hosting providers don't support tomcat v8.0 I need to create a v7.0 project.

所以,我正在尝试使用 tomcat v7.0 服务器。我已经使用了 tomcat v8.0 服务器,但是因为托管服务提供商不支持 tomcat v8.0,所以我需要创建一个 v7.0 项目。

Library

图书馆

But when I try to start the server, this is what happens:

但是当我尝试启动服务器时,会发生以下情况:

NOTE: I do not have a servlet-api.jar in my WEB-INF/lib

注意:我的 WEB-INF/lib 中没有 servlet-api.jar

Sep 29, 2015 8:59:15 AM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at     org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more

采纳答案by Chinthaka Dinadasa

check {TOMCAT_HOME}/logs/catalina.outfor more possible errors in this scenario. I think this is because of the wrong configurations in server-config. Previously you have used the tomcat 8 then it will still have the previous configurations. So clean full project and remove all the servers then start with Tomcat 7.0

检查{TOMCAT_HOME}/logs/catalina.out在这种情况下更多可能的错误。我认为这是因为 server-config 中的配置错误。以前你用过tomcat 8,那么它还是以前的配置。所以清理整个项目并删除所有服务器然后从Tomcat 7.0开始

回答by Aurasphere

Do you have anything deployed on the server while are you starting it? Try this:

您在启动服务器时是否在服务器上部署了任何内容?尝试这个:

  1. Right click on the server/Add and remove...
  2. Remove every project from server and click ok.
  3. Right click on the server/Clean.
  4. Start the server again.
  1. 右键单击服务器/添加并删除...
  2. 从服务器中删除每个项目,然后单击确定。
  3. 右键单击服务器/清理。
  4. 再次启动服务器。

回答by VdeX

In eclipse double click and open server. open Modules view.

在eclipse中双击打开服务器。打开模块视图。

List of web modules can be seen.

可以看到网络模块列表。

Remove unnecessary modules, save and retry.

删除不必要的模块,保存并重试。

回答by Ninad Pingale

Delete existing server in the "Servers" view (tab) of eclipse.

在 Eclipse 的“服务器”视图(选项卡)中删除现有服务器。

Also delete servers folder in navigator/project explorer in eclipse.

还要删除 eclipse 中导航器/项目资源管理器中的服务器文件夹。

Recreate server, it worked for me.

重新创建服务器,它对我有用。