The following shows the error that I ran Tomcat when I was using SPRINGMVC because of a problem with the Web. XML configuration.
Severity: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[/springmvcfiletest]] at Java.util.concurrent.FutureTask.report (Unknown Source) at Java.util.concurr Ent. Futuretask.get (Unknown Source) at Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:947) at O Rg.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:1425) at Org.apache.catalina.core.containerbase$startchild.call ( containerbase.java:1415) at Java.util.concurrent.FutureTask.run (Unknown Source) at org.apache.tomcat.util.threads.i Nlineexecutorservice.execute (inlineexecutorservice.java:75) at Java.util.concurrent.AbstractExecutorService.submit (Unknown Source) at Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941) 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:657) at Sun.reflect.NativeMethodAccessorImpl.invoke0 ( Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccesso Rimpl.invoke (Unknown source) at Java.lang.reflect.Method.invoke (Unknown source) at Org.apache.catalina.startup.Boots Trap.start (bootstrap.java:355) at org.apache.catalina.startup.Bootstrap.maIn (bootstrap.java:495) caused by:org.apache.catalina.LifecycleException:Failed to start component [standardengine[ Catalina]. Standardhost[localhost]. Standardcontext[/springmvcfiletest]] 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:1425) at Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1415) at Java.util.concurrent.FutureTask.run (Unknown Source) at Org.apache.tomcat.util.threads.InlineExecutorService.execute (inlineexecutorservice.java:75) at Java.util.concurrent.AbstractExecutorService.submit (Unknown Source) at Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941) ... morecaused By:java.lang.IllegalArgumentException:Servlet Mapping Specifies an unknown Servlet name [SPRINGMVC] at Org.apache.catalina.core.StandarDcontext.addservletmappingdecoded (standardcontext.java:3101) at Org.apache.catalina.Context.addServletMappingDecoded (context.java:879) at Org.apache.catalina.startup.ContextConfig.configureContext (contextconfig.java:1386) at Org.apache.catalina.startup.ContextConfig.webConfig (contextconfig.java:1197) at Org.apache.catalina.startup.ContextConfig.configureStart (contextconfig.java:775) 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:5003) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183) ... + September 02, 2018 8:15:07 pm org.apache.catalina.core.ContainerBase startinternal severity: A child container failed during star Tjava.util.concurrent.executionexception:org.apache.catalina.lifecycleexception:a child container failed during Start 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:947) 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:657) at Sun.reflect.NativeMethodAccessorImpl.invoke0 ( Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccesso Rimpl.invoke (Unknown source) at Java.lang.reflect.Method.invoke (Unknown source) at ORg.apache.catalina.startup.Bootstrap.start (bootstrap.java:355) at Org.apache.catalina.startup.Bootstrap.main ( bootstrap.java:495) caused By:org.apache.catalina.lifecycleexception:a child container failed during start at Org.apac He.catalina.core.ContainerBase.startInternal (containerbase.java:956) 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:1425) at Org.apache.catalina.core.containerbase$startchild.call ( containerbase.java:1415) at Java.util.concurrent.FutureTask.run (Unknown Source) at org.apache.tomcat.util.threads.i Nlineexecutorservice.execute (inlineexecutorservice.java:75) at Java.util.concurrent.AbstractExecutorService.submit (Unknown Source) at Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941) ... More than September 02, 2018 8:15:07 PM Org.apache.catalina. Startup. Catalina start Critical: The required Server component failed to start so Tomcat are unable to start.org.apache.catalina.Lifecycle Exception:a child container failed during start at Org.apache.catalina.core.ContainerBase.startInternal (containerbase . java:956) 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:657) at Sun.reflect.NativeMethodAccessorImpl.invoke0 ( Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at Sun.reflect.DelegatingMethodAccesso Rimpl.invoke (UNknown source) at Java.lang.reflect.Method.invoke (Unknown source) at Org.apache.catalina.startup.Bootstrap.start (Boo tstrap.java:355) at Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:495)
Generally, the above error message, the reason is probably the Web. XML configuration error or jar package error
Next, I modified only one of the information in the Web. XML configuration file, and the project will work as expected.
The following post I have not changed the previous web. XML and commented on which part of the error.
<?XML version= "1.0" encoding= "UTF-8"?><Web-appXmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xmlns= "Http://xmlns.jcp.org/xml/ns/javaee"xsi:schemalocation= "Http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"ID= "webapp_id"version= "3.1"> <Display-name></Display-name> <!--Configuring the SPRINGMVC front-end controller - <servlet> <Servlet-name>Spring</Servlet-name> <Servlet-class>Org.springframework.web.servlet.DispatcherServlet</Servlet-class> <!--contextconfiglocation configuration Springmvc loaded configuration file Configuration Processor Mapper, adapter, etc. if you do not configure Contextconfiglocation, the default plus It's/web-inf/spring-mvc-servlet.xml. - <Init-param> <Param-name>Contextconfiglocation</Param-name> <Param-value>Classpath:springmvc.xml</Param-value> </Init-param> <!--Springmvc.xml Configuring the processor mapper under Classpath - </servlet> <servlet-mapping> <!--The local error ~servlet-name not correspond to the name configured above. - <Servlet-name>Springmvc</Servlet-name> <!--The first type: *.action access to. Action ends by Dispatcherserevlet parsing the second type:/ All access addresses are resolved by dispatcherservlet the parsing of the static file needs to be configured not to allow Dispatcherservlet to parse the third:/* This configuration is not correct, using this configuration will eventually be forwarded to a JSP page, Will still be resolved by Dispatcherservlet JSP address, can not find handler based on JSP page, will be error - <Url-pattern>*.html</Url-pattern> </servlet-mapping> <Filter> <Filter-name>Localefilter</Filter-name> <Filter-class>Com.zwk.filter.LocaleFilter</Filter-class> </Filter> <filter-mapping> <Filter-name>Localefilter</Filter-name> <Url-pattern>*.html</Url-pattern> </filter-mapping> <filter-mapping> <Filter-name>Localefilter</Filter-name> <Url-pattern>*.jsp</Url-pattern> </filter-mapping> <welcome-file-list> <Welcome-file>Index.html</Welcome-file> <Welcome-file>Index.htm</Welcome-file> <Welcome-file>index.jsp</Welcome-file> <Welcome-file>Default.html</Welcome-file> <Welcome-file>Default.htm</Welcome-file> <Welcome-file>default.jsp</Welcome-file> </welcome-file-list></Web-app>
Use SPRINGMVC to appear failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[/springmvcfiletest]]