在弄SSM整合配置文件,测试的时候出现了问题:
控制台信息为:
十二月 01, 2018 11:42:35 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyBatis_06_ssm' did not find a matching property.
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.0.52
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Apr 28 2018 16:24:29 UTC
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.0.52.0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 10
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 10.0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jre1.8.0_181
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_181-b13
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: C:\Users\火子\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Users\火子\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=C:\Users\火子\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
十二月 01, 2018 11:42:35 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十二月 01, 2018 11:42: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_181\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_181/bin/server;C:/Program Files/Java/jre1.8.0_181/bin;C:/Program Files/Java/jre1.8.0_181/lib/amd64;C:\Program Files\Java\jre1.8.0_181\bin;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Program Files\Java\jdk1.8.0_181\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\runtime\win64;C:\WINDOWS\System32\OpenSSH\;D:\bin;D:\polyspace\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Windows\System32;C:\Program Files\Java\jdk1.8.0_181\jre\bin;C:\ProgramData\Oracle\Java\javapath;E:\apache-maven-3.3.3-bin\apache-maven-3.3.3\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Users\火子\AppData\Local\Microsoft\WindowsApps;C:\WINDOWS\System32;;.
十二月 01, 2018 11:42:36 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
十二月 01, 2018 11:42:37 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 01, 2018 11:42:37 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
十二月 01, 2018 11:42:37 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 01, 2018 11:42:37 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2660 ms
十二月 01, 2018 11:42:37 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 01, 2018 11:42:37 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.52
十二月 01, 2018 11:43:00 下午 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.
十二月 01, 2018 11:43:34 下午 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[/MyBatis_06_ssm]]
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:945)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
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[/MyBatis_06_ssm]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name spring
at org.apache.catalina.core.StandardContext.addServletMappingDecoded(StandardContext.java:3230)
at org.apache.catalina.core.StandardContext.addServletMappingDecoded(StandardContext.java:3221)
at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1375)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1183)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:773)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
十二月 01, 2018 11:43:34 下午 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:945)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641)
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:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
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:953)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
十二月 01, 2018 11:43:34 下午 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[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641)
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:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 11 more
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-nio-8080"]
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-nio-8009"]
十二月 01, 2018 11:43:34 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-nio-8080"]
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol destroy
严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645)
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:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-nio-8009"]
十二月 01, 2018 11:43:34 下午 org.apache.coyote.AbstractProtocol destroy
严重: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645)
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:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
找了很久,终于发现了问题所在:
我的web.xml配置文件写错了!!!
改正之后就OK啦,所以遇到问题不要慌,你要知道这是你学习的大好时机。
一不小心就改到零点了......为了我浓密的头发还是早点睡觉咯(* ̄︶ ̄)