Announcement Announcement Module
Collapse
No announcement yet.
The matching wildcard is strict, but no declaration can be foun... 'aop:scoped-proxy' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The matching wildcard is strict, but no declaration can be foun... 'aop:scoped-proxy'

    Hello everyone,

    I'm getting the following XML parser error:

    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException:
    Line 11 in XML document from class path resource [context.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 'aop:scoped-proxy'.
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:scoped-proxy'.
    at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(Unknown Source)

    Here is my context.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.0.xsd
    ">

    <bean id="xxxDetails"
    class="xxx.xxxDetails" scope="session">
    <aop:scoped-proxy />
    </bean>

    </beans>

    What is the problem?

    Regards,

    Andreas

  • #2
    Found the problem: spring-aop wasn't on the classpath.

    Not a very nice error message... ClassNotFoundException would have made it much more clear.

    Comment


    • #3
      Actually the problem were these lines on the xml

      http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
      http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.0.xsd

      I think you copied them from another post where they were incomplete (schem...), and that causes a parser error.

      Comment


      • #4
        Same problem...

        I had the same problem, thanks for the solution....

        Originally posted by Goonie View Post
        Found the problem: spring-aop wasn't on the classpath.

        Not a very nice error message... ClassNotFoundException would have made it much more clear.
        A CNFE would not hit the spot as it is the XSD-Schema-File in spring-aop that is missing. That is also the reason that the XML parser is complaining and not the bean factory...

        /Jens

        Comment


        • #5
          Nothing to specifically do with spring aop jars. This could happen when any spring jar is missing from your classpath. Fixing or adding the missing spring libraries in the classpath usually fixes this problem

          Comment

          Working...
          X