[Tomcat] Failed to start component ์—๋Ÿฌ

Johnยท2022๋…„ 11์›” 2์ผ
1

์—๋Ÿฌ ๋ฉ”๋ชจ๐Ÿฅ€

๋ชฉ๋ก ๋ณด๊ธฐ
3/9
post-thumbnail

์—๋Ÿฌ


ํ”„๋กœ์ ํŠธ ํšŒ์‚ฌ ํ”Œ๋žซํผ ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ ๋ฐ ๋ฆฌํŒฉํ† ๋ง ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

Legacy Project๋ฅผ ๋ฆฌํŒฉํ† ๋ง์„ ํ•˜๋‹ค๋ณด๋‹ˆ ๋งŽ์€ ๊ฒƒ์„ ์ˆ˜์ •ํ•ด์•ผ ํ–ˆ๊ณ , ๋‹น์—ฐํ•˜๊ฒŒ๋„ ์˜ค๋ฅ˜๋ฅผ ๋งˆ์ฃผํ–ˆ์Šต๋‹ˆ๋‹ค.. :-(


์—๋Ÿฌ๋กœ๊ทธ

์‹ฌ๊ฐ: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/spring-web]]
	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[Catalina].StandardHost[localhost].StandardContext[/spring-web]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 6 more
Caused by: java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
	at java.lang.Class.getDeclaredFields(Class.java:1916)
	at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
	at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:263)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:92)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
	at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
	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
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
	... 20 more

11์›” 02, 2022 4:32:06 ์˜คํ›„ 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: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.Catalina.start(Catalina.java:691)
	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:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].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

11์›” 02, 2022 4:32:06 ์˜คํ›„ 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:154)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
	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:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 9 more
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.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more

๋ถ„์„

1

2

์—๋Ÿฌ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด๋ณด๋ฉด,
1. org.apache.catalina.LifecycleException: Failed to start component
2. Caused by: java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException

์ฃผ๋œ ๋‚ด์šฉ์€ Tomcat์„ ์‹คํ–‰ํ•  ์ˆ˜ ์—†์œผ๋ฉฐ, JoranException.class๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๊ณ  ๋‚˜์˜ต๋‹ˆ๋‹ค.

JoranException

๊ทธ๋Ÿฌ๋‚˜ JoranException.class๋ฅผ ๊ฒ€์ƒ‰ํ–ˆ์„ ๋•Œ ์‹ค์ œ๋กœ ๊ฒ€์ƒ‰์ด๋ฉ๋‹ˆ๋‹ค.
Q) ๊ทธ๋ ‡๋‹ค๋ฉด ๋ฌธ์ œ๋Š” ๋ฌด์—‡์ผ๊นŒ์š”..?


ํ•ด๊ฒฐ

org.apache.catalina.LifecycleException:
...
java.lang.NoClassDefFoundError
...

์œ„์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด, ์•„๋ž˜ 2๊ฐ€์ง€๋ฅผ ํ™•์ธ!

  1. Maven Project์˜ ๊ฒฝ์šฐ, Maven Repository๋ฅผ ํ™•์ธ
  2. Library๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ, Deployment Assembly๋ฅผ ํ™•์ธ

ํ•ด๊ฒฐ

์ €๋Š” userLibrary๋ฅผ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์•„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.(๐Ÿ˜…)

ํ”Œ๋žซํผ ๋ฒ„์ „์„ ์—…๋ฐ์ดํŠธํ•˜๋ฉด์„œ library์˜ ๋ฒ„์ „์„ ์˜ฌ๋ฆฐ ํ›„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.. ์ด๋Ÿฐ ์‹ค์ˆ˜๋ฅผ..๐Ÿ˜‚


  1. ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ด๋„ ์นจ์ฐฉํ•˜๊ฒŒ ๋กœ๊ทธ๋ฅผ ํ™•์ธ!
  2. ์˜ค๋ฅ˜๋Š” ๊ทธ๋ƒฅ ๋ฐœ์ƒํ•˜์ง€ ์•Š์œผ๋‹ˆ๊นŒ.. ์ด์œ ๋Š” ๋ถ„๋ช…ํžˆ์žˆ๋‹ค!
profile
๊ธฐ๋ก์„ ์Šต๊ด€์œผ๋กœ

0๊ฐœ์˜ ๋Œ“๊ธ€