Krishna Mohan created DIRAPI-293:
------------------------------------

             Summary: Unable to connect to an Active Directory server using 
'[email protected]'. 
                 Key: DIRAPI-293
                 URL: https://issues.apache.org/jira/browse/DIRAPI-293
             Project: Directory Client API
          Issue Type: Bug
    Affects Versions: 1.0.0-RC2
         Environment: Windows 7 Professional 64 bit
            Reporter: Krishna Mohan


Unable to connect to an Active Directory server using '[email protected]'. For 
example [email protected]

Looks like Apache Directory LDAP API expects always DN as name for a bind 
request.

Interestingly i was able to connect using Apache Directory Studio. What am I 
doing wrong in API code?

Here is the sample code that i tried. Please check the exception stack trace 
below.

LdapConnectionConfig config = new LdapConnectionConfig();
config.setLdapHost( serverName);
config.setLdapPort( serverPort );
config.setName( userDN );
config.setCredentials( password );

LdapConnection connection = new LdapNetworkConnection(config);

try {
        connection.bind(userDN, password);
} catch (LdapException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
}


org.apache.directory.api.ldap.model.exception.LdapInvalidDnException: ERR_04202 
A value is missing on some RDN
        at org.apache.directory.api.ldap.model.name.Dn.<init>(Dn.java:282)
        at 
org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:112)
        at com.actiance.platform.ldap.LDAPClient.<init>(LDAPClient.java:86)




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to