|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://server.raleigh.basf-corp.com:389"); env.put(Context.SECURITY_PRINCIPAL, "uid=username"); env.put(Context.SECURITY_CREDENTIALS, "password"); DirContext ctx = new InitialDirContext(env); When I try to create a new InitialDirContext, I receive the following: [LDAP: error code 32 - No Such Object] The error in the ldap log has the following: BIND dn="uid=username" method=128 version=3 RESULT err=32 tag=97... closing - B1 closed. If I remove the uid= for the SECURITY_PRINCIPAL then I receive a error: [LDAP: error code 34 - Invalid DN] I have seen these errors on numerous forums, but no solution is provided. Any suggestions? -ld |
|
#2
|
|||
|
|||
|
re: Java authentication with ldap
Quote:
I found a solution. It happens that the ldap server that I was using had an invalid entry. I pointed to another ldap server and the problem is resolved. -ld |
![]() |
| Viewing: Dev Shed Forums > Databases > LDAP Programming > Java authentication with ldap |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|