아노미7
64
2017-08-16 16:41:35
3
1518

maven 기반의 java 웹 프로젝트 실행시 LifecycleException으로 서버가 실행이 안됩니다.


안녕하세요. 웹 프로그래머가 되기 위해 공부하고 있는 학생입니다.

mvc 패턴으로 게시판을 구축하고 있는데 욕심이 나서 maven 기반으로 의존성을 설정해서 해보자고 생각이 들어서 프로젝트 구성을 했었는데.


이런 메시지가 떠서 저번주부터 고생하고 있습니다. 서블릿 파일을 지우고 jsp 파일만 프로젝트에 존재하는 경우에는 서버가 실행되구요. 그래서 서블릿 문제라고 생각이 들어서 서블릿 버전을 3.1로 올리고 jdk 폴더안에 톰캣 서버의 서블릿 jar 파일도 넣어봤구요..

결국 포기하고 스프링 mvc 기반으로 애플리케이션을 구축하는데. 서버 실행이 STS에서 제공하는 MVC 기본 프로젝트에서는 되는데. 스프링 버전을 최신버전(4.3.6)과 서블릿 버전을 3.1로 올리니깐 또 서버 실행이 안되네요..

project Facets에서 DyNAMIC WEB Module버전을 3.1으로 올리는 것도 해봤고요.

임베디드 톰캣 환경에서도 프로젝트 실행해봤습니다. 결과는 항상 같은 에러메시지와 함께 서버실행이 안되는 것이었습니다. 구글링으로 할 수 있는 모든 조치는 해봤지만 안되고 있어요.ㅠ

이문제로 얼마나 고생하고 있는지 모르겠습니다. 도와주십시오 고수님들.

아래는 에러메시지입니다.


java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/minu]]
    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: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(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[Catalina].StandardHost[localhost].StandardContext[/minu]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    ... 6 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:256)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:132)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:336)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:786)
    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
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    ... 20 more

8월 16, 2017 4:33:59 오후 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(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    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:630)
    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.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(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:951)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    ... 6 more

8월 16, 2017 4:33:59 오후 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:630)
    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.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

8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["http-nio-8080"]
8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["ajp-nio-8009"]
8월 16, 2017 4:33:59 오후 org.apache.catalina.core.StandardService stopInternal
정보: Stopping service Catalina
8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["http-nio-8080"]
8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol destroy
심각: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:883)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
    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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["ajp-nio-8009"]
8월 16, 2017 4:33:59 오후 org.apache.coyote.AbstractProtocol destroy
심각: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:883)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
    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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

0
0
  • 답변 3

  • 겨울의속삭임
    1k
    2017-08-16 16:42:57

    Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;

    0
  • bluerain
    2k
    2017-08-16 16:46:07
    maven 설정 부분에서 clean > update 순으로 해보세요.
    0
  • 아노미7
    64
    2017-08-22 22:52:22

    자문자답] servlet 버전 문제인 것 맞았습니다.

    프로젝트 생성 후 프로젝트 폴더 선택 후 alt + enter로 속성으로 들어가서 project facets를 선택

    Dynamic Web Module 3.1로 바꿔줍니다. 자바도 1.8로 바꿔주고 오른쪽 편에서 Runtime에서 서버 런타임을 꼭 선택해줘야합니다. 프로젝트 생성 후 바로 이 작업이 선행되면 오류없이 서버측에서 실행되더군요.

    이 문제때문에 일주일 이상을 고생한 것같습니다...대답해주신 분들 모두 감사합니다.


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