Announcement Announcement Module
Collapse
No announcement yet.
Trouble with the Spring Security — Tutorial Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with the Spring Security — Tutorial

    Hi, I am new to Spring and working through the following tutorial: http://static.springsource.org/sprin.../tutorial.html


    What I am noticing is that the schemas that are documented to use do not match up with the build version of Spring Security that is to be downloaded for the tutorial.

    The tutorial asks for the 'http://www.springframework.org/schema/security/spring-security-3.1.xsd' to be used for the security-app-context.xml file, however, the tuturial requested that I download the '3.0.5.RELEASE'. I noticed that I was getting the following exception:
    Code:
    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring-security-3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    I changed the schema to point to 'http://www.springframework.org/schema/security/spring-security-3.0.xsd' and was not getting the error.

    However, this broke another part of the tutorial; part where you bypass security for static resources.

    Code:
    <http pattern="/static/**" secured="false" />
    If anyone could provide some insight on this, it would be greatly appreciated. thanks!

  • #2
    I'm having a similar problem with the Roo tutorial
    http://www.springsource.org/roo/guide?w=beginning
    Both the http and authentication-manager Spring NameSpace handlers for these in elements in Spring security are "unknown".

    Comment


    • #3
      The tutorial seems to be in an odd state as neither Spring nor Spring Security released their respective 3.1 version yet. You'll notice that Spring Security 3.1.x requires at least Spring 3.0.6. Also, the tutorial does /not/ request that you download Spring 3.0.5.RELEASE (just checked). Instead it says "Download the latest Spring Security distribution and unzip the file. Find the file spring-security-samples-tutorial-3.1.x.war".
      The file http://www.springframework.org/schem...curity-3.1.xsd does exist.

      Comment


      • #4
        Code:
        <http pattern="/static/**" security="none"  />
        Use 'security' attribute instead of 'secured'.

        Comment

        Working...
        X