title: Spring Security LDAP on Weblogic Server
body: <p>i'm tring to use ldap for authentication in Weblogic Server but I have this problems always:</p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#8': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.ldap.core.support.BaseLdapPathContextSource]: Could not convert constructor argument value of type [org.springframework.security.ldap.authentication.LdapAuthenticationProvider] to required type [org.springframework.ldap.core.support.BaseLdapPathContextSource]: Failed to convert value of type 'org.springframework.security.ldap.authentication.LdapAuthenticationProvider' to required type 'org.springframework.ldap.core.support.BaseLdapPathContextSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.ldap.authentication.LdapAuthenticationProvider] to required type [org.springframework.ldap.core.support.BaseLdapPathContextSource]: no matching editors or conversion strategy found
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:670)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
      Truncated. see log file for complete stacktrace
  </code></pre>
  
  <p>My security-application-context.xml:</p>
  
  <pre><code>&lt;beans:bean id="contextSource"
              class="org.springframework.security.ldap.DefaultSpringSecurityContextSource"&gt;
        &lt;beans:constructor-arg value="ldap://127.0.0.1:7001/DC=base_domain"/&gt;
        &lt;beans:property name="userDn" value="CN=Admin"/&gt;
        &lt;beans:property name="password" value="weblogic"/&gt;
      &lt;/beans:bean&gt;
  
      &lt;beans:bean id="ldapAuthProvider"
          class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider"&gt;
        &lt;beans:constructor-arg&gt;
         &lt;beans:bean class="org.springframework.security.ldap.authentication.BindAuthenticator"&gt;
           &lt;beans:constructor-arg ref="contextSource"/&gt;
           &lt;beans:property name="userDnPatterns"&gt;
             &lt;beans:list&gt;&lt;beans:value&gt;uid={0},ou=people&lt;/beans:value&gt;&lt;/beans:list&gt;
           &lt;/beans:property&gt;
         &lt;/beans:bean&gt;
       &lt;/beans:constructor-arg&gt;
        &lt;beans:constructor-arg&gt;
         &lt;beans:bean
           class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator"&gt;
           &lt;beans:constructor-arg ref="contextSource"/&gt;
           &lt;beans:constructor-arg value="ou=groups"/&gt;
           &lt;beans:property name="groupRoleAttribute" value="ou"/&gt;
         &lt;/beans:bean&gt;
       &lt;/beans:constructor-arg&gt;
      &lt;/beans:bean&gt;
  &lt;authentication-manager&gt;
          &lt;ldap-authentication-provider server-ref="ldapAuthProvider" /&gt;
      &lt;/authentication-manager&gt;
  </code></pre>
  
  <p>I'm using:</p>
  
  <pre><code>&lt;spring.version&gt;3.0.0.RELEASE&lt;/spring.version&gt;
  &lt;spring.security.version&gt;3.0.0.RELEASE&lt;/spring.version&gt;
  </code></pre>
  
  <p>ANY help will be apreciated,</p>
  
  <p>Ths a Lot!!!</p>
  
  <p>Vinidog </p>