Spring Security 3.1 LDAP Active Directory Issue -


i trying setup ldap active directory , getting below error, new spring security. using spring core 3.2 , spring security 3.1, 1 help....

    org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.filterchains': cannot resolve reference bean 'org.springframework.security.web.defaultsecurityfilterchain#13' while setting bean property 'sourcelist' key [13]; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.web.defaultsecurityfilterchain#13': cannot resolve reference bean 'org.springframework.security.web.authentication.usernamepasswordauthenticationfilter#0' while setting constructor argument key [1]; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.web.authentication.usernamepasswordauthenticationfilter#0': cannot resolve reference bean 'org.springframework.security.authentication.providermanager#0' while setting bean property 'authenticationmanager'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.authentication.providermanager#0': cannot resolve reference bean 'org.springframework.security.config.authentication.authenticationmanagerfactorybean#0' while setting constructor argument; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.config.authentication.authenticationmanagerfactorybean#0': factorybean threw exception on object creation; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.authenticationmanager': cannot resolve reference bean 'myldapauthprovider' while setting constructor argument key [0]; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'myldapauthprovider' defined in servletcontext resource [/web-inf/context/webappcontext-security.xml]: resolution of declared constructors on bean class [org.springframework.security.ldap.authentication.ad.activedirectoryldapauthenticationprovider] classloader [webappclassloader   context: /myapp delegate: false  repositories: /web-inf/classes/ ----------> parent classloader:  org.apache.catalina.loader.standardclassloader@75e4fc  ] failed; nested exception java.lang.noclassdeffounderror:     org/springframework/ldap/namingexception @ org.springframework.beans.factory.support.beandefinitionvalueresolver.resolvereference(beandefinitionvalueresolver.java:329) @ org.springframework.beans.factory.support.beandefinitionvalueresolver.resolvevalueifnecessary(beandefinitionvalueresolver.java:107) 

my wepappsecuroty-context.xml is,

     <?xml version="1.0" encoding="utf-8"?>      <beans xmlns="http://www.springframework.org/schema/beans"    xmlns:sec="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">  <sec:http pattern="/public/login.jsp" security="none"/> <sec:http pattern="/index.jsp*" security="none"/> <sec:http pattern="/images/**" security="none"/> <sec:http pattern="/js/**" security="none"/> <sec:http pattern="/public/**" security="none"/> <sec:http pattern="/styles/**" security="none"/> <sec:http pattern="/services/**" security="none"/> <sec:http pattern="/public/login.jsp" security="none"/>   <sec:http use-expressions="true" entry-point-ref="loginurlauthenticationentrypoint">     <sec:intercept-url pattern="/ui/login.do" access="permitall"/>     <sec:intercept-url pattern="/ui/**" access="isauthenticated()"/>     <sec:intercept-url pattern="/**" access="isauthenticated()"/>     <sec:form-login login-page="/public/login.jsp"/> </sec:http> <bean id="loginurlauthenticationentrypoint"       class="org.springframework.security.web.authentication.loginurlauthenticationentrypoint">     <property name="loginformurl" value="/ui/login.do"/> </bean> <bean id="securityfilter"       class="org.springframework.security.web.authentication.usernamepasswordauthenticationfilter">      <property name="authenticationmanager" ref="authenticationmanager"/>     <!--  when user provides correct username/password , authentication successful -->     <property name="authenticationsuccesshandler"               ref="authenticationsuccesshandler"/> </bean> <sec:authentication-manager alias="authenticationmanager">     <sec:authentication-provider ref="myldapauthprovider"/> </sec:authentication-manager> <bean id="myldapauthprovider"       class="org.springframework.security.ldap.authentication.ad.activedirectoryldapauthenticationprovider">     <constructor-arg value="xxxx"/>     <constructor-arg value="ldaps://xxxxx:1111/dc=ent,dc=yyy,dc=xxxx,dc=corp"/>     <property name="convertsuberrorcodestoexceptions" value="true"/>     <property name="useauthenticationrequestcredentials" value="true"/>     <property name="authoritiesmapper" ref="grantedauthoritiesmapper"/> </bean>  <bean id="grantedauthoritiesmapper" class="com.blah.security.myauthoritymapper"/>  <bean id="authenticationsuccesshandler"       class="org.springframework.security.web.authentication.savedrequestawareauthenticationsuccesshandler">     <property name="defaulttargeturl" value="/ui/home.do"/> </bean> 

java.lang.noclassdeffounderror:     org/springframework/ldap/namingexception 

have added corresponding jar (spring-ldap.jar) classpath ?

if so, check spring-ldap.jar's version against spring-core.jar's version.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -