1

This is the java method i have written to connect above AD LDS

public static void  test(){
    Hashtable<String, String> ldapEnv = new Hashtable<String, String>(11);
    ldapEnv.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    ldapEnv.put(Context.PROVIDER_URL,"ldap://10.10.10.10:389/");
    ldapEnv.put(Context.SECURITY_PRINCIPAL,"admin".concat("@").concat("dem"));//admin is the credential to login in the '10.10.10.10' server
    ldapEnv.put(Context.SECURITY_AUTHENTICATION, "simple");
    ldapEnv.put(Context.SECURITY_CREDENTIALS, "password");
    //ldapEnv.put(Context.SECURITY_PROTOCOL, "ssl");
     try {
        new InitialDirContext(ldapEnv);
    } catch (NamingException e) {
        e.printStackTrace();
    }
} 

I am getting following error when i am running this .please suggest what is the error.

javax.naming.AuthenticationException: [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 2030, v2580
vks
  • 123
  • 1
  • 11

0 Answers0