ふたりで

springboot+war(deploy error ServletInitializer(listenerStop) contextDestroyed 실패시 해결...) 본문

Spring

springboot+war(deploy error ServletInitializer(listenerStop) contextDestroyed 실패시 해결...)

graykang 2021. 3. 22. 18:30
728x90
반응형
SMALL

springboot2.3.0 + security 환경에 war로 tomcat8.5.X에 재배포 시 아래와 같은 에러 로그가 발생하였다.

서비스하는데 큰 문제는 없어 보였지만 심각으로 로그가 올라온다는 거가 뭔가 꺼림칙 해서 관련 자료를 

찾아보았다.

 처음엔 내가 설정을 잘못해서 발생하는 로그인 줄 알고 설정 관련 삽질을 대략 1주일 정도 한 것 같다.

암튼 결정적인 단서를 이곳에서 찾았다.

 

 결론은 springboot버전을 2.3.0에서 2.3.1로 업그레이드하니 더 이상 관련 에러 로그는 보이지 않았다...

(그래도 뭔가 찜찜함....)

 

발생했던 에러 로그:

19-Mar-2021 13:32:18.216 심각 [http-nio-8080-exec-88] org.apache.catalina.core.StandardContext.listenerStop 클래스 [org.springframework.boot.web.servlet.support.SpringBootServletInitializer$1]의 인스턴스인 리스너에게 contextDestroyed 이벤트를 전송하는 중 예외 발생
        java.lang.UnsupportedOperationException: Servlet 3.0 스펙의 4.4 장에 따르면, web.xml 또는 web-fragment.xml 파일에 정의되지 않거나 @WebListener로 annotate되지 않은, ServletContextListener에서 이 메소드를 호출하는 것은 허용되지 않습니다.
                at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.getClassLoader(StandardContext.java:6673)
                at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.deregisterJdbcDrivers(SpringBootServletInitializer.java:134)
                at org.springframework.boot.web.servlet.support.SpringBootServletInitializer$1.contextDestroyed(SpringBootServletInitializer.java:110)
                at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4733)
                at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5399)
                at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
                at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1493)
                at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:375)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:668)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1626)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:748)
728x90
반응형
LIST
Comments