신미성
68
2019-03-13 18:17:27
1
529

maven plugin tomcat 8 빌드 실패 A child container failed during start


tomcat7-maven-plugin 이용해서 tomcat8을 빌드하고 있습니다.  

https://stackoverflow.com/questions/26883836/tomcat-8-maven-plugin-for-java-8

따라 하고 있었는데요. 마지막 단계에서 실행이 안됩니다. 

javax.servlet-api   문제라는 글이 많아서.. 모두 삭제한 상태이고요. tomcat을 제외하고 모두 갖고 있지 않습니다. (pom.xml, jdk)


남은힌트는 

java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsSci cannot be cast to javax.servlet.ServletContainerInitializer

target 설정 일것같은데요. 

package 로 war 파일 만들려고 설정한곳에. 톰캣을 실행하고 있는 로그를 봤었습니다. 

package로 정상 실행됩니다. 

[INFO] Creating Tomcat server configuration at C:\설정한 타겟위치\target\tomcat

[INFO] create webapp with contextPath: 


goals : clean tomcat7:run  실행시 로그입니다. 





3월 13, 2019 5:53:47 오후 org.apache.coyote.AbstractProtocol init

정보: Initializing ProtocolHandler ["http-bio-8080"]

3월 13, 2019 5:53:47 오후 org.apache.catalina.core.StandardService startInternal

정보: Starting service Tomcat

3월 13, 2019 5:53:47 오후 org.apache.catalina.core.StandardEngine startInternal

정보: Starting Servlet Engine: Apache Tomcat/7.0.47

3월 13, 2019 5:53:47 오후 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].StandardContext[]]

	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: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(FutureTask.java:266)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)

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.apache.tomcat.websocket.server.WsSci 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



3월 13, 2019 5:53:47 오후 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(FutureTask.java:122)

	at java.util.concurrent.FutureTask.get(FutureTask.java:192)

	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:107)

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)

	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)

	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)

	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)

	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)

	at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)

	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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

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(FutureTask.java:266)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)

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



[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3.851s

[INFO] Finished at: Wed Mar 13 17:53:47 KST 2019

[INFO] Final Memory: 37M/411M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project "패키지이름": Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during start -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

0
  • 답변 1

  • vernum
    972
    2019-03-13 19:31:53

    적어도 pom파일과 프로젝트 구조를 알아야 다른분들이 해답을 찾을 듯 한데요

  • 로그인을 하시면 답변을 등록할 수 있습니다.