Announcement Announcement Module
No announcement yet.
<aop:scoped-proxy> error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • <aop:scoped-proxy> error

    I'm trying to set up a scoped-proxy on a session scoped bean. My delcaration (abridged and sanitized) is below:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""
    	<bean id="myBean" class="com.mycompany.MyClass" scope="session">
    Eclipse (and Tomcat when I try to deploy the resulting WAR) is showing this error on the <aop:scoped-proxy/> line:
    "cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:scoped-proxy'."

    I honestly don't know what the error really means, and google didn't help much. The most relevant result I found was to make sure that spring-aop was on the classpath, and it's in my maven pom.xml as a dependency (version 2.0.6). Eclipse can even see it for completion assistance which at least tells me that the project knows of it's existence. I can also confirm that it's in the WEB-INF/lib folder of my WAR. Is there any other dependency needed or do I need to alter my namespace declarations, or is it something wrong somewhere else?

  • #2
    It's a validation error saying that aop:scoped-proxy is not allowed at that place. Apparently, this can't be correct as your Eclipse auto-completion also shows. So the remaining question is where the validation error comes from. The only thing that I can think of is a problem with the classpath. It must be different than the one you set up in Eclipse.



    • #3
      What version of spring are you using?