java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].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:1239) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690) 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[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162) ... 6 more Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> .gif in servlet mapping at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3432) at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3407) at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1438) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1359) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5519) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) ... 6 more 10월 29, 2021 4:51:56 오후 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:1239) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:758) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.startup.Catalina.start(Catalina.java:694) 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:343) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474) 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:1700) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690) 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:1247) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) ... 6 more 10월 29, 2021 4:51:56 오후 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:694) 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:343) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474) 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:758) 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:444) 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:1247) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) ... 11 more
톰캣 서버의 web.xml 설정후 클린하고 기동했는데 갑자기 잘되던 톰캣이 에러발생함...
구글링 결과 LifecycleException 에러는 다음과 같은 방식으로 해결 가능하다고 한다.
1) Clean 작업
- Project > Clean > 해당 프로젝트 선택 후 Project Clean
- 프로젝트 오른쪽 클릭 > Maven > Update Project
- Servers 탭 > Tomcat 서버 오른쪽 클릭 > 서버 Clean
- Servers 탭 > Tomcat 서버 오른쪽 클릭 > Clean Tomcat Work Directory
2) Maven repository 다시 다운로드
- 메이븐 repository 모두 삭제 후 다시 build
- update project 진행
위에 방법 다해봤지만 여전히 발생하는 서버 톰캣에러...
바꾼 톰캣 설정이 잘못됬나 싶어 다시 web.xml 소스 확인하니까 * 를 빼먹었었다 !
다시 * 추가하고 저장함
변경전
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
<url-pattern>.js</url-pattern>
<url-pattern>.css</url-pattern>
<url-pattern>.jpg</url-pattern>
<url-pattern>.gif</url-pattern>
<url-pattern>.png</url-pattern>
<url-pattern>.ico</url-pattern>
<url-pattern>.swf</url-pattern>
</servlet-mapping>
변경후
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
<url-pattern>*.js</url-pattern>
<url-pattern>*.css</url-pattern>
<url-pattern>*.jpg</url-pattern>
<url-pattern>*.gif</url-pattern>
<url-pattern>*.png</url-pattern>
<url-pattern>*.ico</url-pattern>
<url-pattern>*.swf</url-pattern>
</servlet-mapping>
그래도 같은 에러 발생..
build path 살펴보니 maven update, clean 등 등으로 초기 설정인 jre로 바뀌어진 듯 했다.
프로젝트 오른쪽 클릭 > build path > Libraries > JRE System Library
jre 말고 jdk 1.8로 선택 후 저장
그래도 동일한 에러...발생 !!ㅠㅠ
서버 지우고 다시만들어도 똑같은 에러 Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1247)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 11 more
build path > 새로 만든 톰캣 서버 다시 설정 해도 에러 해결 불가..
이클립스 재기동 , 컴퓨터 재기동 했지만 안되서 뭔가 꼬인 듯 하다..
+ 다음 날 톰캣 기동]
LifecycleException 에러는 갑자기 사라지고 ...??? 응?
새로운 에러인 java.lang.ClassNotFoundException 발생,,
# ClassNotFoundException 해결하기 위해 시도한 방법들
1. Project Clean - 해결 안됨
2. 프로젝트 오른쪽 클릭 > Properties > Java Build Path > JRE System Library 체크
Apply 했지만 여전히 동일한 에러 발생함..
3. properties > Deployment Assembly > ADD> Java Build Path Entries > Maven dependencies 추가 및 다른 dependencies 추가
dependency에 추가가 안된 라이브러리들이 남아있었다..
추가하니까 서버 정상기동되었다...!!!ㅠㅠ
또한 톰캣 서버의 web.xml에 설정했던 url-pattern도 정상 동작되었다..
험난한 에러해결의 길,, 함부로 프로젝트 클린, 메이븐 업데이트, 서버 클린 등을 하면 안될 것 같다..
뭔가 꼬이나봄,, 나와 비슷한 에러가 발생하면 참고 하시길..