Results 1 to 3 of 3

Thread: <aop:scoped-proxy> error

  1. #1
    Join Date
    Sep 2007
    Posts
    6

    Question <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. #2
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    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
    This post can contain insufficient information.

  3. #3

    Default

    What version of spring are you using?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •