Searching an LDAP directory through JAVA

Discussion in 'Java' started by FET, Aug 25, 2003.

  1. FET

    FET Guest

    Hi all,
    I am trying to search a Microsoft Active Directory server on Windows
    2003 using Netscape LDAP API. I have the entire DIT in place as:
    ou=product,o=cos,dc=myweb,dc=com

    Under this tree, I successfully added a cn=user1 and some attributes.
    But I am unable to search the directory using this api. The exact
    error is as follows:

    netscape.ldap.LDAPException: error result (32); 0000208D: NameErr:
    DSID-03151E4D, problem 2001 (NO_OBJECT), data 0, best match of:
    'DC=myweb,DC=com'
    ; matchedDN = DC=myweb,DC=com; No such object

    LDAPUrl is ldap://<server>:389/CN=user1,OU=product,O=cos,C=IN,DC=myweb,DC=com
    I simply construct an LDAPUrl as above and perform a search on it
    thus:
    LDAPSearchResults results = new LDAPConnection().search(lurl);

    I get the exception at the line where I call the
    LDAPConnection().search.

    Please help me.
    Thank you in advance.
    Regards.
    FET, Aug 25, 2003
    #1
    1. Advertising

  2. FET

    mathewhai

    Joined:
    Mar 4, 2008
    Messages:
    1
    This can happen because the user cn=user1 does not have permission to acces the ou=product,o=cos,dc=myweb,dc=com. Perhaps you can modify the access Control lists for this OU and can work around this issue.
    mathewhai, Mar 4, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ronen Diment
    Replies:
    1
    Views:
    834
    Olaf Lenzmann
    Dec 9, 2003
  2. anand
    Replies:
    1
    Views:
    349
    Nigel Wade
    Apr 22, 2005
  3. Ged

    ldap searching

    Ged, Oct 29, 2007, in forum: Java
    Replies:
    2
    Views:
    352
  4. hotani
    Replies:
    8
    Views:
    565
    Michael Ströder
    Apr 24, 2008
  5. stumblng.tumblr
    Replies:
    1
    Views:
    190
    stumblng.tumblr
    Feb 4, 2008
Loading...

Share This Page