Announcement Announcement Module
Collapse
No announcement yet.
<aop:scoped-proxy> error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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:

    Code:
    <?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.springframwork.org/schema/aop"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    						http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    
    	<bean id="myBean" class="com.mycompany.MyClass" scope="session">
    		<aop:scoped-proxy/>
    	</bean>
    </beans>
    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.

    Joerg

    Comment


    • #3
      What version of spring are you using?

      Comment

      Working...
      X