title: Spring LDAP returning exception: java.lang.ClassNotFoundException: org.springframework.ldap.core.LdapEncoder
body: <p>I'm using Spring 3.2.7 and Spring Security 3.2.0</p>
  
  <p>I'm using Apache DS 2.0.0 on my local Windows computer.  All of the users have their passwords stored as plain text, no encryption.</p>
  
  <p>I have the following defined in my spring config XML:</p>
  
  <pre><code>        &lt;?xml version="1.0" encoding="UTF-8"?&gt; 
          &lt;beans xmlns="http://www.springframework.org/schema/beans"  xmlns:security="http://www.springframework.org/schema/security" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:jdbc="http://www.springframework.org/schema/jdbc" 
          xmlns:context="http://www.springframework.org/schema/context"  
          xsi:schemaLocation="        
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd      
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd        
      http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd       
      http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd"&gt;         
      &lt;security:http auto-config="true" &gt;         
      &lt;security:intercept-url pattern="/hello" access="ROLE_SCARVAREZ_MEMBER" /&gt;      
  &lt;security:form-login/&gt;  
      &lt;/security:http&gt;        
      &lt;security:authentication-manager&gt;
                              &lt;security:ldap-authentication-provider 
                              user-dn-pattern="uid={0},ou=people"
                              group-search-base="ou=groups" 
                              group-search-filter="(member={0})"
                              &gt;
                              &lt;/security:ldap-authentication-provider&gt;        
      &lt;/security:authentication-manager&gt;      
      &lt;security:ldap-server url="ldap://localhost:10389/dc=example,dc=com" /&gt;      
      &lt;/beans&gt;
  </code></pre>
  
  <p>I get the default Spring login form.  However, when I attempt to log in, I get the following exception:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.springframework.ldap.core.LdapEncoder
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
      org.springframework.security.ldap.authentication.AbstractLdapAuthenticator.getUserDns(AbstractLdapAuthenticator.java:95)
      org.springframework.security.ldap.authentication.BindAuthenticator.authenticate(BindAuthenticator.java:80)
      org.springframework.security.ldap.authentication.LdapAuthenticationProvider.doAuthentication(LdapAuthenticationProvider.java:178)
      org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider.authenticate(AbstractLdapAuthenticationProvider.java:61)
      org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
      org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:177)
      org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94)
      org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
  </code></pre>
  
  <p>I can't figure out what JAR file I need to include to get past this exception.</p>
  
  <p>I'm not using Maven, but here are the JAR files in my project:</p>
  
  <pre><code>aopalliance.jar 
  aspectj-1.7.2.jar 
  aspectjweaver-1.7.2.jar
  commons-logging-1.1.1.jar 
  javax.servlet.jsp.jstl-1.2.1.jar
  javax.servlet.jsp.jstl-api-1.2.1.jar 
  log4j-1.2.17.jar
  sl4j-api-1.7.5.jar 
  spring-aop-3.2.7.jar 
  spring-aspects-3.2.7.jar
  spring-beans-3.2.7.jar 
  spring-context-3.2.7.jar 
  spring-core-3.2.7.jar
  spring-expression-3.2.7.jar 
  spring-jdbc-3.2.7.jar
  spring-ldap-core-2.0.1.jar 
  spring-ldapcore-tiger.2.0.1.jar
  spring-security-config-3.2.0.jar 
  spring-security-core.3.2.0.jar
  spring-security-ldap-3.2.0.jar 
  spring-security-taglibs-3.2.0.jar
  spring-security-web-3.2.0.jar 
  spring-tx-3.2.7.jar 
  spring-web-3.2.7.jar
  spring-webmvc-3.2.7.jar
  </code></pre>
  
  <p>Any help would be much appreciated!</p>