关于Tomcat启动报错问题
Server Tomcat v8.5 Server at localhost failed to start.(本地主机服务器Tomcat v8.5服务器启动失败。)
2018年09月23日 11:40:54 扬帆天涯 阅读数:1 标签: 1 2 3 4
编辑
Tomcat启动报错原因
1
九月 23, 2018 11:32:35 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:javaweba1’ did not find a matching property.
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.5.32
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun 20 2018 19:50:35 UTC
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.5.32.0
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jre1.8.0_144
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_144-b01
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\Tomcat\apache-tomcat-8.5.32
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\Tomcat\apache-tomcat-8.5.32
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\Tomcat\apache-tomcat-8.5.32\endorsed
九月 23, 2018 11:32:35 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
九月 23, 2018 11:32:35 上午 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: [C:\Program Files\Java\jre1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_144/bin/server;C:/Program Files/Java/jre1.8.0_144/bin;C:/Program Files/Java/jre1.8.0_144/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;E:\Tomcat\apache-tomcat-8.5.32;C:\Users\Administrator\Desktop;;.]
九月 23, 2018 11:32:35 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-nio-8282”]
九月 23, 2018 11:32:36 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 23, 2018 11:32:36 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-nio-8383”]
九月 23, 2018 11:32:36 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 23, 2018 11:32:36 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1326 ms
九月 23, 2018 11:32:36 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
九月 23, 2018 11:32:36 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.32
九月 23, 2018 11:32:39 上午 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.
九月 23, 2018 11:32:39 上午 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[/javaweba1]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBase StartChild.call(ContainerBase.java:1421) at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/javaweba1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
… 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [forwardServlet] and [cn.itcast.Servlet.ForwardServlet] are both mapped to the url-pattern [/forwardServlet] which is not permitted
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:326)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:319)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2379)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2056)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1942)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1936)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1936)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1936)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1143)
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:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more
九月 23, 2018 11:32:39 上午 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]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBase StartChild.call(ContainerBase.java:1421) at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more
九月 23, 2018 11:32:39 上午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8181]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
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:167)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
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:949)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 11 more
九月 23, 2018 11:32:39 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“http-nio-8282”]
九月 23, 2018 11:32:39 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“ajp-nio-8383”]
九月 23, 2018 11:32:39 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service [Catalina]
九月 23, 2018 11:32:39 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“http-nio-8282”]
九月 23, 2018 11:32:39 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“ajp-nio-8383”]
上面这个错误是由于@WebServlet("/forwardServlet")和
冲突导致。二者都是配置Servlet的信息,所以只需要写其中的一个即可。
上面这些是我上次写的,最近又发现一个Tomcat报的同样的错误
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property ‘useBodyEnoodingForURI’ to ‘true’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:JavaWebx’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:Tushuguan’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:JavaE2’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:web1’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:JavaWebx2’ did not find a matching property.
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.5.32
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun 20 2018 19:50:35 UTC
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.5.32.0
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jre1.8.0_144
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_144-b01
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\Tomcat\apache-tomcat-8.5.32
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\Tomcat\apache-tomcat-8.5.32
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\Tomcat\apache-tomcat-8.5.32\endorsed
十一月 18, 2018 10:37:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十一月 18, 2018 10:37: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: [C:\Program Files\Java\jre1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_144/bin/server;C:/Program Files/Java/jre1.8.0_144/bin;C:/Program Files/Java/jre1.8.0_144/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;E:\Tomcat\apache-tomcat-8.5.32;G:\360用户文件\360下载\bin;%CATALINA_HOME%\lib;%CATALIN A_HOME%\bin;D:\111\VisualSVN\1\bin;D:\111\TortoiseSVN\bin;C:\Pro;D:\360安全浏览器下载\MySQL\mysqls\bin;D:\MYSQLX1\bi;C:\Users\Administrator\Desktop;;.]
十一月 18, 2018 10:37:31 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-nio-8282”]
十一月 18, 2018 10:37:32 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十一月 18, 2018 10:37:32 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-nio-8383”]
十一月 18, 2018 10:37:32 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十一月 18, 2018 10:37:32 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1018 ms
十一月 18, 2018 10:37:32 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
十一月 18, 2018 10:37:32 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.32
十一月 18, 2018 10:37:35 上午 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.
十一月 18, 2018 10:37:35 上午 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[/web1]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase S t a r t C h i l d . c a l l ( C o n t a i n e r B a s e . j a v a : 1421 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e StartChild.call(ContainerBase.java:1421) at org.apache.catalina.core.ContainerBase StartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
… 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@5bb6a1f6]
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)
… 6 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [D:\eclipseCode.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\web1] 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)
… 9 more
十一月 18, 2018 10:37:38 上午 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.
十一月 18, 2018 10:37:41 上午 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.
十一月 18, 2018 10:37:43 上午 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.
十一月 18, 2018 10:37:46 上午 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.
十一月 18, 2018 10:37:46 上午 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]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase S t a r t C h i l d . c a l l ( C o n t a i n e r B a s e . j a v a : 1421 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e StartChild.call(ContainerBase.java:1421) at org.apache.catalina.core.ContainerBase StartChild.call(ContainerBase.java:1421)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more
十一月 18, 2018 10:37:46 上午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8181]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
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:167)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
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:949)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 11 more
十一月 18, 2018 10:37:46 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“http-nio-8282”]
十一月 18, 2018 10:37:46 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“ajp-nio-8383”]
十一月 18, 2018 10:37:46 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service [Catalina]
十一月 18, 2018 10:37:46 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“http-nio-8282”]
十一月 18, 2018 10:37:46 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“ajp-nio-8383”]
经过分析原因很快找了出来,即我用Tomcat运行的这个类是普通类,不是Servlet类。众所周知,只有servlet类,才不用写主函数,直接由Tomcat调用即可,并且Servlet的生命周期类都是由Tomcat调用的。
总结:Tomcat只能运行jsp,HTML,XML页面,Servelt等等。普通类想要运行,必须要有主函数。并且通过主函数调用类中相应的方法。