on 10-10-2007 1:32 PM
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
Anoop,
You are trying to connect to a secure LDAP server and thats why it expects a server certificate.
Follow this link.
http://java.sun.com/products/jndi/tutorial/ldap/security/ssl.html
Hope that's helpful.
Regards,
Rajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anoop,
Have you uploaded the LDAP servers certificate in the TrustedCAS of the keystore in Visual Admin in the WAS server? If you are using LDAP ssl the connection to the server will expect a certificate if you dont have the trust enabled you wont be able to connect.
Regards
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
good
go through this link
http://help.sap.com/saphelp_nw04s/helpdata/en/48/d1d13f7fb44c21e10000000a1550b0/content.htm
thanks
mrutyun^
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.