-
프로젝트 import 후 실행 안되는 문제 해결IDE 2016. 8. 7. 09:16
공부하면서 다운받은 예제 프로젝트를 이클립스에 추가하여 실행했는데, 빌드 중 아래와 같은 로그가 나오면서 실패했다. 구글링, 스택오버플로우를 확인해봤는데, 뽀족한 수를 찾지는 못했고, 공부하던 책 저자님이 조언해주셔서 문제를 해결할 수 있었다.
로그일부
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/controller]] 아래와 같이 조치하여 해결하였다.
1. Maven 저장소 초기화
Maven 저장소 문제인 것이 확실하고, 아래 경로의 파일을 삭제했다. 삭제 후에는 자동으로 라이브러리 파일이 다운로드 된다.
이클립스 - Window - Properties - Maven - User settings - Local Repository
따로 설정을 바꾸지 않았다면 보통 "C:\Users\username\.m2\repository" 로 지정되어 있다. 이 경우, .m2 가 숨김폴더이기 때문에 보이기 설정을 해야할 수 있다. 아래 화면은 내 설정인데, "D:/dev_repacat/repository" 로 설정되어 있다.
2. 클린 작업
1번 작업 후 아래 작업도 했으나 아마 1번만으로 해결이 된 것 같다. 혹시 모르니 적어둔다.
2-1. Servers 탭 > Tomcat 우클릭 > Clean
2-2. Servers 탭 > Tomcat 우클릭 > Clean Tomcat Work Direcotry
2-3. Menu > Project > Clean
2-4. Project Explorer > 프로젝트 우클릭 > Maven > Update Project
※ 전체로그
8월 03, 2016 10:28:19 오후 org.apache.tomcat.util.digester.SetPropertiesRule begin
경고: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ex05' did not find a matching property.
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Server version: Apache Tomcat/8.0.36
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Server built: Jun 9 2016 13:55:50 UTC
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Server number: 8.0.36.0
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: OS Name: Windows 10
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: OS Version: 10.0
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Architecture: amd64
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Java Home: C:\Program Files\Java\jdk1.8.0_91\jre
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: JVM Version: 1.8.0_91-b15
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: JVM Vendor: Oracle Corporation
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: CATALINA_BASE: D:\dev_repacat\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: CATALINA_HOME: D:\dev_repacat\server\apache-tomcat-8.0.36
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Command line argument: -Dcatalina.base=D:\dev_repacat\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Command line argument: -Dcatalina.home=D:\dev_repacat\server\apache-tomcat-8.0.36
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Command line argument: -Dwtp.deploy=D:\dev_repacat\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Command line argument: -Djava.endorsed.dirs=D:\dev_repacat\server\apache-tomcat-8.0.36\endorsed
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Command line argument: -Dfile.encoding=UTF-8
8월 03, 2016 10:28:19 오후 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
정보: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_91\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_101/bin/server;C:/Program Files/Java/jre1.8.0_101/bin;C:/Program Files/Java/jre1.8.0_101/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;C:\Program Files\MySQL\MySQL Server 5.7\bin;D:\dev_repacat\eclipse;;.
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol init
정보: Initializing ProtocolHandler ["http-nio-8080"]
8월 03, 2016 10:28:19 오후 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
정보: Using a shared selector for servlet write/read
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol init
정보: Initializing ProtocolHandler ["ajp-nio-8009"]
8월 03, 2016 10:28:19 오후 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
정보: Using a shared selector for servlet write/read
8월 03, 2016 10:28:19 오후 org.apache.catalina.startup.Catalina load
정보: Initialization processed in 450 ms
8월 03, 2016 10:28:19 오후 org.apache.catalina.core.StandardService startInternal
정보: Starting service Catalina
8월 03, 2016 10:28:19 오후 org.apache.catalina.core.StandardEngine startInternal
정보: Starting Servlet Engine: Apache Tomcat/8.0.36
8월 03, 2016 10:28:19 오후 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].StandardContext[/controller]]
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:915)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/controller]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@41d7a9c9]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4958)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5088)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@45f2d82a]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:699)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 9 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:139)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.IOUtils.readFully(IOUtils.java:65)
at java.util.jar.JarFile.getBytes(JarFile.java:425)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
at java.util.jar.JarFile.getManifest(JarFile.java:180)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:137)
... 13 more
8월 03, 2016 10:28:19 오후 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:915)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
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: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:153)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:923)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 6 more
8월 03, 2016 10:28:19 오후 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:153)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
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: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:153)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:923)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 11 more
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["http-nio-8080"]
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["ajp-nio-8009"]
8월 03, 2016 10:28:19 오후 org.apache.catalina.core.StandardService stopInternal
정보: Stopping service Catalina
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["http-nio-8080"]
8월 03, 2016 10:28:19 오후 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:316)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
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:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
8월 03, 2016 10:28:19 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["ajp-nio-8009"]
8월 03, 2016 10:28:19 오후 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:316)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
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:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)'IDE' 카테고리의 다른 글
이클립스에서 xml 파일 열 때 텍스트 에디터로 설정 (0) 2016.08.20 이클립스 탭키 입력시 처리 수정 (0) 2016.08.02 이클립스 유용한 단축키 (0) 2016.07.23 이클립스 Java 설정 (0) 2016.07.23 이클립스 라인카피(Ctrl+Alt+Down) 단축키 안먹을 때 (0) 2016.07.23