I\'m a college student. Now, i\'m doing a project that must use LDAP connection to authenticate the username and password of the user in log in process. So, my website is de
The "javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN] " in your stack trace is the key. Your LDAP server doesn't like the value you are sending it. I would suggest fully qualifying the user name, something like cn=username, ou=some_container, o=mycompany. The actual syntax will be driven by your LDAP server.