Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Connect to LDAP

Hi,

While i am trying to connect to LDAP , i am getting an exception

javax.naming.CommunicationException: simple bind failed: wdsapusny001001.sapad.internal.symbol.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate

found]

The code i used is

Hashtable env = new Hashtable();

String ADuid = "A94444";

String ADpwd = "asdasdasd";

env.put(Context.INITIAL_CONTEXT_FACTORY,

"com.sun.jndi.ldap.LdapCtxFactory");

env.put(Context.SECURITY_AUTHENTICATION,"simple");

env.put(Context.SECURITY_PRINCIPAL,ADuid);

env.put(Context.SECURITY_CREDENTIALS,ADpwd);

env.put(Context.SECURITY_PROTOCOL,"ssl");

env.put(Context.PROVIDER_URL, "ldaps://wdsapusny001001.sapad.internal.com:636");

try {

DirContext ctx = new InitialDirContext(env);

}catch(Exception ex){

wdComponentAPI.getComponent().getMessageManager().reportException( ex.toString(),false);

}

please give me some suggestions

AM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question