스프링 겪은 에러
프로젝트명에 x표시와 !표시
import 시킨 jar 파일의 경로가 잘못되었거나 유효하지 않은 파일이나 디렉토리를 참조하고 있는 경우
초기 문제 확인하는 법
[Window] -> [Show View] -> [Problems] 선택하여 무슨 문제가 있는 지 확인한다.
-
case 1.
[프로젝트명 우클릭] -> Properties -> [Libraries]-> JRE System Library(자신의 JRE로 설정)
-
case 2.
-
에러명 :
Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet. ngnedu Unknown Faceted Project Problem (Java Version Mismatch)
- [프로젝트명 우클릭] -> Properties -> Java Compiler -> Compiler compliance level (JDK 버전 맞춰주기)
- [프로젝트명 우클릭] -> Properties -> Maven -> Project Facets -> Java(JDK 버전 맞춰주기)
-
-
case 3.
[Servers] 에서 [clean], [clean tomcat work Directory] 순차적으로 진행
-
case 4.
- Maven을 통해 받은 파일
User 폴더로 가서 .m2 하위 폴더인 repository 지우고 다시 빌드
자동빌드되지만 [프로젝트명 우클릭] -> Maven -> Update Project 클릭
-
case 5.
-
에러명 :
java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
-
java.lang.ClassNotFoundException:org.springframework.web.util.Log4jConfigListener
잘돌아가던 eclipse에서 tomcat 실행시 갑자기 class를 찾지 못한다는 오류 발생하면서, 서버가 정상적으로 실행되지 않는 문제
- [프로젝트 우클릭] -> Properties -> [Deployment Assembly] -> [Add] -> [Java Build Path Entries] -> Maven Dependencies -> Apply
-
-
case 6.
-
에러명 :
Class not found [config set: /web-context]
실제로 클래스가 없던지, STS 버그추정 - > 패키지명과 클래스명 다시 확인 -> 틀린게 없으면 jar파일이 제대로 있는지 확인
-
문제가 없는데도 에러가 안없어지면 순차적 실행
- [프로젝트 우클릭]-> spring -> Rmove spring project Nature
- [프로젝트 우클릭]-> spring -> Add spring project Nature
-
-
-
case 7.
-
에러명 :
Dynamic Web Module 3.1 requires Java 1.7 or newer
라는 오류이클립스에서 메이븐 연동시 기존 프로젝트를 메이븐 프로젝트로 convert시키게 되는데 거기서 따라 생기는 pom.xml의 코드가 자바 버전이 맞지 않아서 생긴 문제
-
[windows]-> preferences-> java compiler -> 버전확인
-
프로젝트 [properties] -> [build path] -> [libraries]->[jre system library] 수정
-
프로젝트 [properties] -> [project facets] -> java 버전확인
-
pom.xml -> maven-compiler-plugin -> source, target 버전수정
<artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.8</source> <target>1.8</target> <compilerArgument>-Xlint:all</compilerArgument> <showWarnings>true</showWarnings> <showDeprecation>true</showDeprecation> </configuration>
-
[프로젝트 우클릭]-> [Maven] -> [Update Project]
-
-