Announcement Announcement Module
Collapse
No announcement yet.
Spring Security 3 Namespace Configuration Gotcha Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Security 3 Namespace Configuration Gotcha

    Hi
    I am not able to understand why am I getting the following error:
    Code:
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You cannot use a spring-security-2.0.xsd schema with Spring Security 3.0. Please update your schema declarations to the 3.0 schema.
    when I try to run my application having following security namespace configuration:

    Security configuration:
    Code:
    <beans:beans xmlns="http://www.springframework.org/schema/security"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:beans="http://www.springframework.org/schema/beans"
    	xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    	xsi:schemaLocation="
    		http://www.springframework.org/schema/beans 
    		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    		http://www.springframework.org/schema/jdbc  http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
    		http://www.springframework.org/schema/security 
    		http://www.springframework.org/schema/security/spring-security-3.0.3.xsd
    	">
    ...
    </beans:beans>
    Could someone help me understand it please?

    Thanks

  • #2
    What version of spring-security-config are you using? Ensure you are using at least spring-security-config-3.0.3.RELEASE since that is the schema you are pointing to.

    Comment


    • #3
      Spring Security 3 Namespace Configuration Gotcha

      Hi rwinch
      Many thanks for the reply. I was the impression that I was using spring 3.0.5 library but I actually was using 3.0.0 one. I changes the jars to 3.0.5 version and I am not getting the error I was getting before.
      Many thanks

      But still, in my application any of the Security annotations are not working, even when I have <global-method-security pre-post-annotations="enabled" /> in my security configuration file.

      @PreAuthorize and @PostFilter, none of them seem to be detected. I was trying the source code from chapter 5 of Spring Security 3 book written by Peter Mularian.

      Any idea what I might be missing for the security annotations not to be detected?

      Thanks

      Comment


      • #4
        Let's please keep the discussion of annotations not working in its own thread

        Comment

        Working...
        X