LDAP: error code 49 - Simple Bind Failed: NT_STATUS_LOGON_FAILURE
I am trying to authenticate the user but it throws Exception .May be there is problem in configuration. public class LdapApplication { private static final String INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory"; private static final String SECURITY_AUTHENTICATION ="simple"; private static final String NAMED_CONTEXT = "CN=Users"; private static final String SAM_ACCOUNT_NAME = "sAMAccountName="; public static void main(String[] args) { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,INITIAL_CONTEXT_FACTORY); env.put(Context.PROVIDER_URL, "ldap://ip:portNo/dc