[error] 이클립스 tomcat 시작 에러

공수정·2021년 10월 25일
0

error

목록 보기
2/10
  • 개발환경
    - 윈도우
    - 자바 1.8
    - tomcat 8.0
  • 문제상황

    프로젝트를 시작하니 시작이 되는데 jsp 페이지에서 이미지, bootstrap등이 load가 안되고, console에도 여러 줄의 error가 찍힘

  • 에러메세지

    INFO: 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\eclipse-jee-2021-03-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\eclipse-jee-2021-03-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin;C:/Program Files/eclipse-jee-2021-03-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;C:/Program Files/eclipse-jee-2021-03-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Java\jdk1.8.0_201\bin;C:\Users\공수정\AppData\Local\Programs\Python\Python38;C:;Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Users\공수정\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\공수정\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\;C:\Users\공수정\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\PyCharm 2020.3.2\bin;;C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.2\bin;;C:\Users\공수정\AppData\Roaming\npm;;C:\Program Files\eclipse-jee-2021-03-R-win32-x86_64\eclipse;;.
    10월 25, 2021 2:12:39 오후 org.apache.catalina.core.JreMemoryLeakPreventionListener lifecycleEvent
    SEVERE: Failed to trigger creation of the GC Daemon thread during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
    java.lang.ClassNotFoundException: sun.misc.GC

  • 원인

    검색을 해보니 tomcat 8을 자바 11과 연결했을 때 나는 오류라고 한다.
    tomcat과 java버전이 맞지 않거나, jdk가 제대로 설정이 되어있지 않을 때 나는 오류인듯 싶다.

  • 해결방법

    시도 해 본 것들
    1. tomcat 버전을 9.0으로 높임
    The archive: /Servers/apache-tomcat-9.0.43/bin/bootstrap.jar which is referenced by the classpath, does not exist. 오류
    -> Run configrations - tomcat 9.0 - classpath - bootstrap.jar 를 delete
    -> 또 오류,,,삭제 ㅠㅜ
    2. 경로 수정
    window - preperence - java - installJREs 여기에 default jre만 있어서 jdk를 추가
    -> ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
    -> 오타로 인한 오류 : tomcat은 dispatcher-servlet.xml을 찾는데 xml 파일 이름을 오타냄
    -> 성공

profile
계속해서 공부하는 개발자입니다 :)

0개의 댓글