|
| Problem using JNDI for DIGEST-MD5 SASL mechanism |
 |
Tue, 07 Mar 2006 06:10:15 GMT |
Hi
I am facing problem while using non english characters for user name in
Novell eDirectory 8.7.3.
Using Simple bind in JNDI java program I am able to get the context.
But while using JNDI java program for DIGEST-MD5 SASL mechanism I am
getting the following exception
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
Credentials]
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3005)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2752)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2666)
at com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:307)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:190)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:208)
at
com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:151)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:81)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:675)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:257)
at javax.naming.InitialContext.init(InitialContext.java:233)
at javax.naming.ldap.InitialLdapContext.(InitialLdapContext.java:145)
at Simple.main(Simple.java:29)
I am using the following code for connecting jndi application to novell
edirectory server.
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.ldap.*;
import javax.naming.directory.*;
class Simple
{
public static void main(String[] args)throws Exception {
// Set up environment for creating initial context
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ipaddress:port");
env.put("java.naming.ldap.version", "3");
env.put(Context.SECURITY_PRINCIPAL, "dn:cn=français,o=company");
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_CREDENTIALS, "test123");
try {
System.out.println(env);
// Create initial context
DirContext ctx = new InitialLdapContext(env,null);
System.out.println("The context using sasl bind " + ctx);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
Could anyone help with a solution?
Thanks and Regards
|
| Post Reply
|
| Re: Problem using JNDI for DIGEST-MD5 SASL mechanism |
 |
Tue, 02 May 2006 01:14:03 GMT |
Its likely best that you post to the ldap_j newsgroup ..
--
Peter
|
| Post Reply
|
|
|
|
|
|
|
|
|
|