본문 바로가기

Interest/tip

mac+eclipse+spring+maven 에서 ClassNotFoundError 해결방법


분명히 잘 돌아가는 프로젝트인데 mac환경을 새로 꾸려서 하고 있는데 (정확히 말하면 그냥 다른 환경이다.) 자꾸 멀쩡히 있는 Class를 Load할 수 없다는 에러가 떴다.

ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter

Maven clean
Maven update Dependency
프로젝트 새로 checkout
프로젝트 clean
서버 지웠다가 깔기 등등 (<- 이건 좀 무식하네) 


등등등 별의 별 방법을 써봤지만 계속 Maven Library의 일부를 못읽어서 구글신에게 요청한 결과 

여러 방법중에 하나를 알아냈다. 
(링크) http://forum.springsource.org/showthread.php?60812-ClassNotFoundException-org-springframework-web-con-text-ContextLoaderListener

방법은 간단했다.

I fixed the error with Maven by going to project properties -> Deployment Assembley and adding the Maven Dependency Build Path entry

Maven Dependency Build Path가 추가 되어 있지 않았는데 이걸 추가 하는 거였다.

 

 

- maven 프로젝트로 svn 설정하여 생성후 이전 소스들을 카피.

 

- jre system library 버전 체크

 

- 프로젝트 우클릭 -> properties -> deployment assembly -> Source 목록에 Maven Dependencies가 없으면 add 클릭 -> Maven Dependencies 추가

 

- 프로젝트 우클릭 -> properties -> Java Build Path -> Libraries -> 목록이 대충 : EAR Libraries, JRE System Library[JavaSe-버전], Maven Dependencies, Web App Libraries

 

- 프로젝트 우클릭 -> run as -> maven pakage 실행


이제 본격적인 개발 시작~ 

'Interest > tip' 카테고리의 다른 글

BOM  (0) 2012.10.12
mac+virtual machine + window7 + usb  (0) 2011.12.20
opensource IPhone App  (0) 2011.05.17
Interface Builder 3.2.1 의... IBOutlet을 인식 못했던 문제..  (0) 2009.12.14
cvs  (0) 2009.06.29