0
votes

I am trying to integrate Spring security with my Apache Wink application. REST services are integrated with spring and working fine.

When I made changes in spring context to add Spring security, I started getting following following error.

13:53:08,199 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 127) Context initialization failed: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'authentication-manager'. One of '{"http://www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"], "http://www.springframework.org/schema/beans":beans}' is expected.

I have my own Authentication provider. Below is my application context xml file. Could anyone tell me what is wrong with it ?

enter image description here

1

1 Answers

0
votes

I figured it out. My default namespace is beans, so it was looking authetication-manager in that ns. I changed the tag to point to security ns and application built fine.

<security:authentication-manager alias="authenticationManager">