File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes LDAP configuration in TOmcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "LDAP configuration in TOmcat" Watch "LDAP configuration in TOmcat" New topic

LDAP configuration in TOmcat

sivaraman subbiah

Joined: Dec 29, 2008
Posts: 7
Hi ,

I am using LDAP authentication in tomcat 5.5

my settings are as below in server.xml :


<Realm className="org.apache.catalina.realm.JNDIRealm"
debug="99" connectionURL="ldap://IP here:389/"
connectionPassword="MyPasswordHere" />


Settings in web.xml :


<web-resource-name>Logging Area</web-resource-name>
Only registered members can access this area.





please type User name format as:

If I dont give my connectionName and connectionPassword I get "cannot bind" exception. So, probably the ldap server does not accept anonymous connections.Correct me if i am wrong.

After giving connectionName and connectionPassword, I am getting this error :
SEVERE: Exception performing authentication
javax.naming.InvalidNameException: "Domain\user_Name here": [LDAP: error code 34 - 0000208F: LdapErr: DSID-0C090654, comment: Error processing name, data 0, vece ]; remaining name
''Domain\user_Name here"

at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.c_getAttributes(Unknown Source)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(Unknown Source)
at Source)
at org.apache.catalina.realm.JNDIRealm.getUserByPattern(
at org.apache.catalina.realm.JNDIRealm.getUser(
at org.apache.catalina.realm.JNDIRealm.authenticate(
at org.apache.catalina.realm.JNDIRealm.authenticate(
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
at Source)

I agree. Here's the link:
subject: LDAP configuration in TOmcat
It's not a secret anymore!