eclipse 启动tomcat 总提示“Publishing to Tomcat v6.0 Server at localhost 怎么解决
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了eclipse 启动tomcat 总提示“Publishing to Tomcat v6.0 Server at localhost 怎么解决相关的知识,希望对你有一定的参考价值。
就是在 eclipse 中把项目启动在Tomcat v6.0 Server 上时 先是不Starting Tomcat 而是"Publishing to Tomcat v6.0 Server at localhost ...."啊。。。。。
eclipse 启动tomcat 总提示“Publishing to Tomcat v6.0 Server at localhost是设置错误造成的,解决方法为:
1、依次点击Window->Show View->Other。
2、找到Server,点击OK,看到控制台旁边已有Server了。
3、点击server下面的链接,依次选择Apache,根据自己的tomcat选择版本。点击next。
4、选择自己tomcat的路径,选择jre版本,点击继续。
5、若有web项目,可进行Add添加,否则点击Finish. 配置完毕。
6、后可以右键Add and Remove配置项目。
7、启动tomcat。
参考技术A 你使用eclipse工具部署到tomcat6.0了嘛?或者
你在tomcat6的conf/catalina/localhost里面些配置了嘛?
二选一 参考技术B publish发布,当然要先发布再运行 参考技术C 今天我也遇到了类似的问题。。。结果不是tomcat出现问题,也不是eclipse的bug,是项目里面的某些配置文件有问题,在这里帮助一些以后有需要的朋友。。。 参考技术D In Eclipse, Open the "Server" tab.
Double click on the "Tomcat6" entry to see the configuration.
Then click on the "Open launch configuration" link in the "General information" block.
In the dialog, select the "Classpath" tab.
Click the "Add external jar" button.
Select the file "/usr/share/tomcat6/bin/tomcat-juli.jar"
Close the dialog.
Start tomcat 6 from Eclipse.追问
哥们 你说的具体点 你说的服务器标签where? 首选项里?
追答就是server那个图标。
你如果要是以前能用,突然不好使的话直接右键 clean 下试试。要是第一次不能用就是配置问题。
新版eclipse有很多bug
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中多了一个空格...然后就一直这样报错!
以上是关于eclipse 启动tomcat 总提示“Publishing to Tomcat v6.0 Server at localhost 怎么解决的主要内容,如果未能解决你的问题,请参考以下文章