티스토리 뷰

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'xxController' for bean class [apps.ctrl.xx.Controller] conflicts with existing, non-compatible bean definition of same name and class

기존 자바 파일을 복사해서 새로운 패키지로 중간에 폴더명에 2만 붙여서 붙여넣기를 했다.

그랬는데 JNDI Exception , properties Exception 이런 에러가 났다.

이상하네.. JNDI 쪽에는 건드린게 없는데..

알고보니 자바 파일(디렉토리) 복사 붙여넣기 한 행동에 문제가 있었고 문제의 오류를 정확하게 출력해주었더라면 빨리 알 수 있었을 텐데 그거에 따라 영향이 미치는 부분의 에러 메시지를 표시해줘서 어디서 오류가 났는지 알 수 가 없었다.

그럴 때는 이클립스의 clean 을 해보는 것도 도움이 될듯하다.

Annotation-specified bean name 'xxxController' for bean class [apps.ctrl.xx.xxController] conflicts with existing, non-compatible bean definition of same name and class [apps.ctrl.xxx.Controller]

복사 붙여넣기 할때 패키지 이름만 바꾸고 클래스(컨트롤러) 이름은 안바꿨더니 기존에 있는 이름과 충돌난다고 표시해주는것 같다.


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함