OpenSource

Tomcat upgrade와 java.util.concurrent.ExecutionException

아르비스 2017. 2. 1. 11:51

Tomcat 7.x를 사용하다가. tomcat 8.x로 올리는중 갑자기 이상한 에러가 발생했다.


01-Feb-2017 00:46:23.140 심각 [Catalina-startStop-1] 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[/fsw]]

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

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

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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

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

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

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/fsw]]

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)

        ... 6 more

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/fsw] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

        at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2108)

        at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2054)

        at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1999)

        at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1969)

        at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1923)

        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1166)

        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:783)

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

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

        ... 6 more


01-Feb-2017 00:46:23.142 심각 [main] 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(FutureTask.java:122)

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

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)

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

        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

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

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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

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

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

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)

        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

        ... 6 more


01-Feb-2017 00:46:23.143 심각 [main] 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[8105]]

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:629)

        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

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

        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

        ... 11 more

 


심각, 심각, 심각, 알지 못하는 이유로  tomcat이 안올라간다.


구글링중 비슷한 문제를 확인했는데..

http://wickedmagic.tistory.com/274


톰캣이 servlet-api.jar를 로딩하다가 문제가 발생한 경우 인것 같다.

tomcat 8은 random 하게 jar를 로딩하면서. 


원인은 tomcat 버전이 servlet 2.5을 사용하지 않고 servlet 3.0을 사용하면서 발생하는 이슈였다. 즉, 프로젝트에 의존관계를 맺고 있는 servlet 2.5 버전을 다음과 같이 3.x 버전으로 업그레이드하면 해결할 수 있다고 한다.