스프링3.0

스프링 3.0 AOP 에러. 문제 해결

사라링 2012. 5. 15. 19:43


에러 메세지 :

심각: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from file [D:\workJSP\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\dditSpring\WEB-INF\classes\kr\or\ddit\config\applicationAOP.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)



cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.


 BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext


등의 에러 메세지가 나왔다. 대충 요약 하면 txManager  인 트렌젝션 매니저를 찾지 못한다는 것이다. 코드를 아무리 분석 해도 문제가 해결 안되었으나 문제는 bean 에 있는 것이 아니라. xsi:schemaLocation 에 있었다.


이 스키마 로케이션에 

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"


으로 추가및 수정 하여 문제 해결!!


but no declaration can be found for element