Spring Security Tutorial (Part-I)

12 comments

  1. Rohan says:

    Nice post Pranav. Simple and very good explanation!!

  2. JavaPins says:

    SpringAddon » Spring Security Tutorial (Part-I)…

    Thank you for submitting this cool story – Trackback from JavaPins…

  3. Abdallah says:

    any downloadable link?

  4. Jana says:

    Hi, thanks for article.I have question.
    Which version ${org.springframework-version}?

  5. Achmad says:

    Can’t wait for next chapter…. :)

  6. Riccardo says:

    Dependencies don’t work under Spring 3.1.1.RELEASE until now.

    To run under Spring 3.1.0.RELEASE use the XML file like this:

  7. Isha Lall says:

    Fantabulous article .. kudos to author …… have been looking for quite a while.. tons of thanks for this article ….

  8. vaibhav says:

    Thanks for the great tutorial, but I am facing some issue with spring version.
    My Spring MVC based application is using 3.0.5.Release and for Spring security also I have mentioned the above-said version, but my application is throwing exception

    java.lang.NoSuchFieldError: USER_DECLARED_METHODS

    There is no version conflicts in my application as well. Please suggest.
    Thank you!

    • Pranav says:

      Most probably it is an issue of conflicting jars mostly this exclusion works, in case it does not try seeing your compiled lib directory or maven hierarchy structure causing the trouble.
      try using exclusion for
      groupId:org.springframework
      artifactId:spring-core

  9. vaibhavshukla says:

    After all work around and resolving almost all jar conflict, finally when i run the application, it is throwing following exception :

    Context initialization failed
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans:beans’.

    And line 10 as you will see is :

    http://www.springframework.org/schema/security/spring-security-3.0.3.xsd

    Now what to do ? What changes should be incorporated further?
    PS: Spring version again is 3.0.5.Release.

  10. vaibhavshukla says:

    Finally.. its resolved and now its working great.
    Problem was with the “xsi:schemaLocation” which was not as per my configuration.

    Changed that in spring-security.xml and its worked.

    xsi:schemaLocation=”http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.0.xsd
    http://www.springframework.org/schema/util
    http://www.springframework.org/schema/util/spring-util-3.0.xsd“>

Leave a Reply

Your email address will not be published. Required fields are marked *

*


five × = 35