eclipse启动tomcat错误解决

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

eclipse启动tomcat错误解决的相关文章

eclipse启动tomcat错误:A Java Exception has occurred(转)

在tomcat bin目录下执行startup.bat可以正常启动,但在eclipse下安装了tomcat插件并且配置tomcat路径后启动且报错:A Java Exception has occurred 解决方法,在eclipse中[window][Preferences]找到[tomcat][JVM Settings],在右边的配置页中找到[Classpath (Before generated classpath)],点击[jar/Zip]在弹出的文件选择框中选择tomcat目录下的bi

eclipse启动tomcat错误:A Java Exception has occurred

在tomcat bin目录下执行startup.bat可以正常启动,但在eclipse下安装了tomcat插件并且配置tomcat路径后启动且报错:A Java Exception has occurred 解决方法,在eclipse中[window][Preferences]找到[tomcat][JVM Settings],在右边的配置页中找到[Classpath (Before generated classpath)],点击[jar/Zip]在弹出的文件选择框中选择tomcat目录下的bi

Eclipse启动Tomcat错误:Several ports (8005,8009) required by Tomcat v6.0 Server at localhost are already

解决办法: 1.netstat -aon|findstr 8005 可查看指定端口号使用情况 2.tasklist |findstr 10452 找出占用指定进程Id的程序 3.taskkill /pid 10452 /F 结束该进程

eclipse 下启动tomcat错误

启用tomcat时报错. FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113) ERROR: transport error 202: gethostbyname: unknown host ["transport.c",L41] ERROR: JDWP Transport dt_socket failed to initialize, TRA

[转]eclipse启动tomcat无法访问的解决方法

这篇文章介绍了eclipse启动tomcat无法访问的解决方法,有需要的朋友可以参考一下 症状: tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误.同时其他项目页面也不能访问. 关闭eclipse里面的tomcat,在tomcat安装目录下双击startup.bat手动启动tomcat服务器.访问htt://localhost:8080/能正常访问tomcat管理页面. 症状原因: eclipse将tomcat的项目

eclipse启动tomcat,突然出现 fail to start错误,导致不能启动

尝试了 1.重新安装tomcat 2.重新在eclipse中配置tomcat服务器 都没能解决 ===================================== 最后看了一个外文的问答页,其中一个回答让仔细检查web.xml文件 肉眼还是看不出什么问题,但是把最后配置的一个servlet重新配一下就好了 注意:在配置web.xml的时候要按照xml的约束规则 排列各个标签的出现顺序 eclipse启动tomcat,突然出现 fail to start错误,导致不能启动,布布扣,bubu

Eclipse启动Tomcat时,45秒超时解决方式

在Eclipse中启动Tomcat服务器时,经常由于系统初始化项目多,导致出现45秒超时的Tomcat服务器启动错误,出现下面的错误. 以前我们一般通过找到XML配置文件,将对应Timeout为45的值,修改为认为足够大来解决问题. 但是有时候这样很麻烦,有时候根本就在配置文件中找不到Timeout的属性值,所以这里有一种可以快速的解决方法. 解决方法: 1.双击Servers视图中的对应的Server,打开Server的属性界面.如下图: 2.在上图的Timeouts->Start属性中,将值

Eclipse启动tomcat后404错误

问题描述 在eclipse部署web项目后,发现tomcat可以启动,但是访问http://localhost:8080地址报404错误.而不使用eclipse启动tomcat,直接通过通过tomcat安装目录下的bin目录启动tomcat则一切正常. 解决方案: 在eclipse的server页面下,将tomcat服务下的所有项目移除(右键->remove) 在tomcat服务器上右键->clean 然后双击tomcat服务器,按如下进行配置. 配置好后,再将需要的项目添加到tomcat服务

eclipse启动tomcat无法访问的解决方法

这篇文章介绍了eclipse启动tomcat无法访问的解决方法,有需要的朋友可以参考一下 症状: tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误.同时其他项目页面也不能访问. 关闭eclipse里面的tomcat,在tomcat安装目录下双击startup.bat手动启动tomcat服务器.访问htt://localhost:8080/能正常访问tomcat管理页面. 症状原因: eclipse将tomcat的项目