본문 바로가기

개발관련/이클립스, Tools, IDE

Cannot find class 이클립스 파일명 변경시 클래스 못찾는 에러 java.lang.ClassNotFoundException:

728x90
이건 그냥 버그다. 다른 파일만들고 rename 시 실행 된다. 근데 class파일은 폴더에서 찾을 수 없다.



->  실제경로는
Workspace > .metadata > plugins > org.ecllipse.wst.server.core > tmp0
> wtpwebapps > 프로젝트명
 
파일을 고쳤어도 실제 경로가 다른 것이니까
요청을 해도 안바뀌는 거다.
 
 
 
1) ㅇ서비스를 하면서 물고 있는 경우, 가끔 물리다 보면 덮어쓰는 과정에서 lock이 걸릴 수 있다.
2) 정적인 파일이지만 동적인 파일일 경우, 컴파일이 되어야 하고 그 결과물이 배포가 되어야한다. (클래스파일이 classes
로 가야하는데) 컴파일이 안되서 그쪽으로 안가는 경우가 있다.
-> 에러가 있어서 컴파일 못하는데 예전 컴파일 그냥 쓸래? 이런 문구를 그냥 오케이 하게 되면
전에 있던 코드가 계속 같이 사용하게 되는 것이다.
3) 브라우저 특성상 캐시를 사용하고 있어서 (가져온파일들을 임시로 저장 하는 - 빨리 응답하기 위해서)
 
 
프로젝트 클린 해줘야 컴파일 새로한다
모든 것들의 반응이 실시간으로 동기화되기 때문에 

2022.05.02 - [개발관련/온라인1기] - 백엔드 2주차 2회(36주차) tomcat다운로드, 이클립스 서버띄우기, 실제 class파일 경로, context 기본

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.spring.sample.common.controller.CommonAOP] for bean with name 'commonAop' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is java.lang.ClassNotFoundException: com.spring.sample.common.controller.CommonAOP Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.spring.sample.common.controller.CommonAOP] for bean with name 'commonAop' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is java.lang.ClassNotFoundException: com.spring.sample.common.controller.CommonAOP

 

 

 

 

 

http://jag212.github.io/ClassNotFoundException/

 

eclipse에서 jsp파일 대소문자 변경시 재컴파일 문제

THANKS GOD. It's Friday. Home About Contact eclipse에서 jsp파일 대소문자 변경시 재컴파일 문제 며칠 전, 팀에서 웹 개발을 하던 중 갑자기 java.lang.ClassNotFoundException이 발생해 난감한 경험이 있었습니다. 에

jag212.github.io

 

 

 

 

 

참고하니 재컴파일 문제 발견

 

 

 

 

 

일일이 찾아보니 해당경로는 다음과 같았다.