Results 1 to 4 of 4

Thread: Spring Security 3 Namespace Configuration Gotcha

  1. #1
    Join Date
    Aug 2010
    Posts
    28

    Default 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. #2
    Join Date
    Jan 2008
    Posts
    1,834

    Default

    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.
    Rob Winch
    Twitter @rob_winch
    Spring Security Lead
    Spring by Pivotal

  3. #3
    Join Date
    Aug 2010
    Posts
    28

    Default 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

  4. #4
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    Let's please keep the discussion of annotations not working in its own thread
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


Tags for this Thread

Posting Permissions

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