Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:52:24+00:00 2026-06-15T13:52:24+00:00

I know very little or nothing about xml and I have to write a

  • 0

I know very little or nothing about xml and I have to write a spring-security.xml file . The problem i guess has something to do with my xml not following xsd. Here is the xml.

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:s="http://www.springframework.org/schema/security"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    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.1.xsd">

    <s:http auto-config="true">
                <s:intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY" />
                <s:intercept-url pattern="/index.jsp" access="IS_AUTHENTICATED_ANONYMOUSLY" />
        <s:intercept-url pattern="/**" access="ROLE_USER" />
                <s:intercept-url pattern="/" access="ROLE_USER" />       
        <s:form-login login-page="/login" default-target-url="/getemp"/>
        <s:logout logout-success-url="/logout" />
    </s:http>

    <s:authentication-manager>
        <s:authentication-provider>

                        <s:ldap-authentication-provider user-dn-pattern="uid={0},ou=people"/>
        </s:authentication-provider>
    </s:authentication-manager>

        <s:ldap-server id="ldapServer" url="ldap://test.com:389" />

</beans>

When I try to run the web application I am getting an error.

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘s:ldap-authentication-provider’. One of ‘{“http://www.springframework.org/schema/security&#8221;:any-user-service, “http://www.springframework.org/schema/security&#8221;:password-encoder}’ is expected.

Here is the xsd

spring security xsd

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:52:25+00:00Added an answer on June 15, 2026 at 1:52 pm

    The xsd says that <s:authentication-manager> accepts as children an authentication-provider OR an ldap-authentication-provider. So, remove the <s:authentication-provider> that is wrapping your <s:ldap-authentication-provider> and that should get you past this problem. Your final code should look like:

    <s:authentication-manager>
        <s:ldap-authentication-provider user-dn-pattern="uid={0},ou=people"/>
    </s:authentication-manager>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know very little about encryption/hashing. I have to hash an encryption key. The
Pardon me if this has already been asked (I know very little about Data
I know very little about JavaScript but despite this I'm trying to cobble something
I know very little about security (I need to find a basic explanation of
I know very little about Flash, and so is not programming in it. I
The code here is X++. I know very little about it, though I am
First, please be gentle, I know very little about DB design. I am working
I know very little about web programming but I need to establish a license
I really know very little about SVN and I'm trying to learn what it's
I'll preface this with two notes: 1) I know very little about Java. 2)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.