org.apache.catalina.loader.WebappClassLoader openJARs 에러...
글쓴이: yosikky / 작성시간: 목, 2009/03/19 - 9:12오전
톰캣이 자꾸 죽습니다..
원인을 모르겠어요.. 갑자기 어느날 보면
2009. 3. 19 오전 7:31:12 org.apache.catalina.loader.WebappClassLoader openJARs
경고: Failed to open JAR
이 메세지가 catalina.out에 엄청나게 찍힙니다..
메시지의 트레이스를 보면..
java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.jar.JarFile.<init>(JarFile.java:133) at java.util.jar.JarFile.<init>(JarFile.java:97) at org.apache.catalina.loader.WebappClassLoader.openJARs(WebappClassLoader.java:1561) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1792) at org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:916) at org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1136) at org.apache.velocity.util.ClassUtils.getResourceAsStream(ClassUtils.java:130) at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:119) at org.apache.velocity.Template.process(Template.java:93) at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:415) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:335) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1102) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1077) at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:528) at org.springframework.web.servlet.view.velocity.VelocityView.getTemplate(VelocityView.java:535) at org.springframework.web.servlet.view.velocity.VelocityView.getTemplate(VelocityView.java:520) at org.springframework.web.servlet.view.velocity.VelocityView.checkTemplate(VelocityView.java:293) at org.springframework.web.servlet.view.velocity.VelocityView.initApplicationContext(VelocityView.java:258) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:304) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1168) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:295) at org.springframework.web.servlet.view.UrlBasedViewResolver.loadView(UrlBasedViewResolver.java:413) at org.springframework.web.servlet.view.AbstractCachingViewResolver.createView(AbstractCachingViewResolver.java:159) at org.springframework.web.servlet.view.UrlBasedViewResolver.createView(UrlBasedViewResolver.java:378) at org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:70) at org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1178) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1122) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:416) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:619)
이렇게 찍힙니다...
어느 한순간 이러기 시작하니 감이 안 잡히네요..
혹시 원인을 알기 위해 어떤 부분을 더 살펴봐야 할까요?
Forums:
tomcat의 설정 파일나
tomcat의 설정 파일나 tomcat이 실행되는 환경 변수에 classpath가 어떻게 잡혀있는지 확인해보세요.
classpath에 걸려있는 jar나 zip을 찾으려고 하는데, 정작 파일은 없고 디렉토리만 있다든가 하면
이런 에러가 발생할 수 있습닌다.
감사합니다....
답변 감사합니다.. 하지만 이런 일이 발생하는 것이 항상이 아니라 약 몇주간 잘 동작을 하다 발생한다는 것이 문제인데요..
발생시점의 아파치로그를 봐도 중구난방이라.. 특정 jar를 못 찾는다거나 하는 문제로 생각하기 어렵다는 것으로 생각되기는 합니다..
그래도 한번 더 jar의 classpath를 확인해보는게 맞겠네요.. 감사합니다..
혹 다른 힌트가 생각나신다면 조언 부탁드리겠습니다(__)
오호호호호호호홋!!!!
JAR 파일 상태를 체크 해보세요
가끔 JAR 파일이 압축이 안풀려서 발생하는 거 일수도 있습니다. 한번 JAR 파일들 압축을 풀어보세요.
감사합니다.
한가지 궁금한 게 있는데요..
혹시 평소에 잘 풀리다가 어떤 환경적인 요인으로 인해서
원래 풀 수 있던 jar를 갑자기 못 풀게 되는 경우가 있을까요?
오호호호호호호홋!!!!
댓글 달기