Hi all,

I have a J2EE web application that I am integrating with LDAP to implment Password Reset functionality to allow AD users to change their own password.

My code works at times, and sometimes it stops working throwing [code]LDAP error code 52, initializing SSL/TLS error.[/code] I don't know why this intermittent error is being thrown? Here's the line of code that gives error.

StartTlsResponse tls = (StartTlsResponse) myLdapContext.extendedOperation(new StartTlsRequest());

Any idea, please?

thanks.

Is that a hex 52 or a decimal 52?
LDAP error 52 (hex) is the totally unhelpful "Local error occurred", but if that's 52 decimal (34 hex) it's the self-explanatory "The server is unavailable"
http://support.microsoft.com/kb/218185

Thanks for the reply.
Infact, the my AD is SSL enabled, and I can connect using ldaps://myhost.com:636. I can establish my LDAP context as well and authenticate my user.

I need to implment change password funtionality in my webapp, and for that I need to establish an SSL or TLS connection, and that's where I get the error code 52.

I have imported my AD server certificate into my JRE's keystore, using keytool utility also.

It appeared that my AD wasn't setup for SSL connection. Had my AD folks fixed that, and everything started working back again! Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.