A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Getting javax.naming.AuthenticationException while connecting to LDAP server from java code
Joined: Aug 18, 2011
Aug 18, 2011 10:42:19
I am trying to connnect to LDAP server from our webapp. The webapp requests the Data from LDAP server by passing the Directorty Server account/access information.
code when I try to create the
by passing the environment and control
My java code looks like this:
ctx = new
"env" is just a HashTable with the following data that it sets based on what user enters on UI
As soon as it try to create a
in java code, it throws a
: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0
I digged little bit details into it. It means invalid credentials; user name or password is incorrect.
But, I can directly login/connect/bind/search to the ldap server from command prompt using ldap.exe utility with the same information.
connect to server: 192.168.72.4:389
Here is what I see in LDAP server by doing a serach using the LDAP utility:
distinguished Name:CN=Sudipti Mishra,OU=Ops,DC=GreyHawk,DC=tonecommander,DC=com
I am not sure why keep on getting this error when I try to login using the Java code. Am I missing something?
Any help is greatly appreciated.
I agree. Here's the link:
subject: Getting javax.naming.AuthenticationException while connecting to LDAP server from java code
Connecting to Active Directory using LDAP
Autenticate from java into Windows Active Directory
servlet querying active directory
Program to validate a user against LDAP
LDAP on websphere app server 7 problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014