Posted By:
Anonymous
Posted On:
Thursday, October 24, 2002 02:16 AM
I'm making an interface between our database and our Microsoft Exchange 5.5. My objetive is to change the Exchange's data automatically. I'm new with jndi. I can read from the directory but when i go to modify any data, java returns me this exception: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'uid=EDUB, ou=my_site, o=my_organization' The uid, site, and organization are correct. What's happening? The program's code is the next one: try { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://my_exch_serv:389&q
More>>
I'm making an interface between our database and our Microsoft Exchange 5.5. My objetive is to change the Exchange's data automatically.
I'm new with jndi. I can read from the directory but when i go to modify any data, java returns me this exception:
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'uid=EDUB, ou=my_site, o=my_organization'
The uid, site, and organization are correct. What's happening?
The program's code is the next one:
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://my_exch_serv:389");
String pClave= new String("uid=EDUB, ou=my_site, o=my_org");
ModificationItem[] pMod= new ModificationItem[1];
Attribute modTelefono = new BasicAttribute("telephonenumber", "945144098");
pMod[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, modTelefono);
DirContext ctx = new InitialDirContext(env);
ctx.modifyAttributes(pClave, pMod);
} catch (Exception e) {
e.printStackTrace();
}
Thank you very much in advance for your interest.
Greetings!!!
<<Less