clipse启动tomcat报出下面的错误提示:
控制台:
九月 06, 2018 9:01:31 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.jee.server:servlet‘ did not find a matching property. 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/9.0.10 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server built: Jun 20 2018 17:32:21 UTC 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server number: 9.0.10.0 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Name: Linux 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Version: 4.15.0-33-generic 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Architecture: amd64 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Vendor: Oracle Corporation 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_BASE: /home/dss/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_HOME: /usr/local/tomcat9 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.base=/home/dss/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.home=/usr/local/tomcat9 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dwtp.deploy=/home/dss/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat9/endorsed 九月 06, 2018 9:01:31 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dfile.encoding=UTF-8 九月 06, 2018 9:01:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib] 九月 06, 2018 9:01:32 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-nio-8080"] 九月 06, 2018 9:01:32 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 九月 06, 2018 9:01:32 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-nio-8009"] 九月 06, 2018 9:01:32 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 九月 06, 2018 9:01:32 下午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 736 ms 九月 06, 2018 9:01:32 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service [Catalina] 九月 06, 2018 9:01:32 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/9.0.10 九月 06, 2018 9:01:34 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 九月 06, 2018 9:01:36 下午 org.apache.catalina.core.ContainerBase startInternal 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/servlet]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/servlet]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) ... 21 more Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name [http1] at org.apache.catalina.core.StandardContext.addServletMappingDecoded(StandardContext.java:3132) at org.apache.catalina.Context.addServletMappingDecoded(Context.java:879) at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1376) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1187) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 27 more 九月 06, 2018 9:01:36 下午 org.apache.catalina.core.ContainerBase startInternal 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:958) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) ... 13 more 九月 06, 2018 9:01:36 下午 org.apache.catalina.startup.Catalina start 严重: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:958) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) 九月 06, 2018 9:01:36 下午 org.apache.coyote.AbstractProtocol pause 信息: Pausing ProtocolHandler ["http-nio-8080"] 九月 06, 2018 9:01:36 下午 org.apache.coyote.AbstractProtocol pause 信息: Pausing ProtocolHandler ["ajp-nio-8009"] 九月 06, 2018 9:01:36 下午 org.apache.catalina.core.StandardService stopInternal 信息: Stopping service [Catalina] 九月 06, 2018 9:01:36 下午 org.apache.coyote.AbstractProtocol destroy 信息: Destroying ProtocolHandler ["http-nio-8080"] 九月 06, 2018 9:01:36 下午 org.apache.coyote.AbstractProtocol destroy 信息: Destroying ProtocolHandler ["ajp-nio-8009"]
搜原因,有的说是缺少jar包或者有的jar包冲突,也有可能是web.xml配置不正确.
实在没办法了,我重新创建了一个项目.同样的操作结果成了.成功开启了tomcat.
再打开原来错误的项目,终于找到了原因,都是自己马虎所致.
原来是自己的web.xml在某个servlet-name中多了一个空格...然后就一直这样报错!
原文地址:https://www.cnblogs.com/dssjustdoit/p/9601067.html
时间: 2024-10-07 06:25:40