본문 바로가기
꿀팁

log4j.dtd(지정된 파일을 찾을 수 없습니다) 오류

by lroot 2020. 4. 5.
728x90
반응형

 

스프링을 설치하고 레거시프로젝트의 mvc프로젝트를 만들면 아래와 같은 오류가 발생합니다. 이 오류를 해결하여 보겠습니다.

마우스 우클릭을 하고 properties 를 보면 아래와 같은 내용을 볼 수 있습니다. 

 

The file cannot be validated as the XML definition "C:\Users\dlrms\eclipse-workspace\Capstone\src\main\java\log4j.dtd (지정된 파일을 찾을 수 없습니다)" that is specified as describing the syntax of the file cannot be located.

 

 

2개의 오류를 아래와 같이 바꿔주고 저장하면 오류가 해결됩니다.

 

변경 전

<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER" "log4j.dtd">

 

변경 후

<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">

댓글