Maven项目tomcat启动失败【A child container failed during start】

运行Tomcat

Maven项目tomcat启动失败【A child container failed during start】_第1张图片

错误报告

严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
	 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:1123)
	 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	 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[Tomcat].StandardHost[localhost].StandardContext[]]
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	 ... 6 more
Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
 	at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1670)
	 at org.apache.catalina.startup.ContextConfig.getServletContainerInitializers(ContextConfig.java:1652)
	 at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1562)
	 at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1270)
	 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
	 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 	... 6 more

一月 10, 2019 2:29: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[Tomcat].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:1123)
	 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	 at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	 at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	 at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
	 at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1238)
	 at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:592)
	 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
	 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
	 at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
	 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
	 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	 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:1131)
	 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 	... 6 more

在pom.xml中添加


      javax.servlet
      javax.servlet-api
      3.0.1
      provided

Maven项目tomcat启动失败【A child container failed during start】_第2张图片

你可能感兴趣的:(错误)