Tuesday, June 28, 2011

no declaration can be found for element 'aop:aspectj-autoproxy'

Problem :

Caused by: org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 28; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:aspectj-autoproxy'.

Solution :


There is a problem with xsd and schema location.In web.xml, I checked xsi:schemaLocation and there is no spring-aop-3.0.xsd.So I modify the web.xml file like that :

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

3 comments:

  1. Hope fully this will help you!

    ReplyDelete
  2. To run the basic AOP based application add the following jar files:
    1.aopalliance.jar
    2.aspectj.jar
    3.cglib.jar
    4.aspectjrt.jar
    5.aspectjweaver.jar

    Hope this will lead you with a good result.

    ReplyDelete