Posted By:
Lisa_Tan
Posted On:
Wednesday, August 20, 2003 08:37 AM
I want to identify the ldap provider services using the following: Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=wayne/o=wayne.edu"); DirContext ctx = new InitialDirContext(env); Attributes attrs = ctx.getAttributes("uid=ag5087, ou=People"); I can compile the file but when I run the file, I always receive the following error message: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'uid=ag5087, ou=People' I h
More>>
I want to identify the ldap provider services using the following:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=wayne/o=wayne.edu");
DirContext ctx = new InitialDirContext(env);
Attributes attrs = ctx.getAttributes("uid=ag5087, ou=People");
I can compile the file but when I run the file, I always receive the following error message:
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'uid=ag5087, ou=People'
I have searched the google. All of the examples have only one o level but I have two.
Can anyone give me hint how I can deal with two o either for url or getAttributes.
Thanks in advance,
Lisa
<<Less