title: java: ldap NamingException
body: <p>I try to use LDAP authentication. </p>
  
  <pre><code>public boolean login(String username, String password){
      AndFilter filter = new AndFilter();
      filter.and(new EqualsFilter("objectclass", "person")).and(new EqualsFilter("uid", username));
      return ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH, filter.toString(), password);
  }
  </code></pre>
  
  <p>Because I used ActiveDirectory server, I have this exception: </p>
  
  <blockquote>
    <p>javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100754, problem 5012 (DIR_ERROR), data 0]; remaning name = '/'</p>
  </blockquote>
  
  <p>In my opinion, this exception showed, because I use <code>DistinguishedName.EMPTY_PATH</code>. </p>
  
  <p>How I can to fix this problem?</p>