eclipse에서 공통컴포넌트 추가하고 tomcat 구동시..
- 작성자 :
- 이*혁
- 작성일 :
- 2012-03-07 14:48:45
- 조회수 :
- 2,403
- 구분 :
- 공통컴포넌트
- 진행상태 :
- 완료
Q
안녕하세요.
eclipse에서 공통컴포넌트를 지정해서 추가하고..
maven package후 run on server로 tomcat구동 할 경우
2012-03-07 14:39:34,192 ERROR [org.springframework.web.servlet.DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovWebLogInterceptor' defined in ServletContext resource [/WEB-INF/config/egovframework/springmvc/egov-com-interceptor.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: egovframework.com.uat.uia.web.EgovLoginController [Xlint:invalidAbsoluteTypeName]
라고 오류가 납니다.
마지막 egovframework.com.uat.uia.web.EgovLoginController
해당 파일도 없던데 어떻게 해야 할까요?
eclipse에서 공통컴포넌트를 지정해서 추가하고..
maven package후 run on server로 tomcat구동 할 경우
2012-03-07 14:39:34,192 ERROR [org.springframework.web.servlet.DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovWebLogInterceptor' defined in ServletContext resource [/WEB-INF/config/egovframework/springmvc/egov-com-interceptor.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: egovframework.com.uat.uia.web.EgovLoginController [Xlint:invalidAbsoluteTypeName]
라고 오류가 납니다.
마지막 egovframework.com.uat.uia.web.EgovLoginController
해당 파일도 없던데 어떻게 해야 할까요?
A
안녕하세요.. 이재혁님..
해당 오류는 AOP의 pointcut 정의가 잘못된 경우(패키지 미지정 등)에 발생되는 것 같습니다..
기존 설정에 변경이 없으신 경우면..
WEB-INF/config/egovframework/springmvc/egov-com-loginaop.xml 에서..
"execution(public * egov..."와 같이 되어 있는 2곳을.. public을 지우시고.. 다음과 같이 변경해 보십시오.
<aop:config>
<aop:aspect id="egov.loginLogAspect" ref="egov.loginlog">
<!-- 로그인 Method -->
<aop:before pointcut="execution(* egovframework.com.uat.uia.web.EgovLoginController.actionMain(..))" method="logLogin" />
<!-- 로그아웃 Method -->
<aop:before pointcut="execution(* egovframework.com.uat.uia.web.EgovLoginController.actionLogout(..))" method="logLogout" />
</aop:aspect>
</aop:config>
그럼.. 즐거운 하루되십시오.
감사합니다.
해당 오류는 AOP의 pointcut 정의가 잘못된 경우(패키지 미지정 등)에 발생되는 것 같습니다..
기존 설정에 변경이 없으신 경우면..
WEB-INF/config/egovframework/springmvc/egov-com-loginaop.xml 에서..
"execution(public * egov..."와 같이 되어 있는 2곳을.. public을 지우시고.. 다음과 같이 변경해 보십시오.
<aop:config>
<aop:aspect id="egov.loginLogAspect" ref="egov.loginlog">
<!-- 로그인 Method -->
<aop:before pointcut="execution(* egovframework.com.uat.uia.web.EgovLoginController.actionMain(..))" method="logLogin" />
<!-- 로그아웃 Method -->
<aop:before pointcut="execution(* egovframework.com.uat.uia.web.EgovLoginController.actionLogout(..))" method="logLogout" />
</aop:aspect>
</aop:config>
그럼.. 즐거운 하루되십시오.
감사합니다.