You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/10/02 16:53:56 UTC

DO NOT REPLY [Bug 23572] New: - alternateURL in JNDIRealm.class does not work

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23572>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23572

alternateURL in JNDIRealm.class does not work

           Summary: alternateURL in JNDIRealm.class does not work
           Product: Tomcat 4
           Version: 4.1.27
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jean-yves.collot@cofiroute.fr


When using the alternateURL option in the JNDI Realm, if the first LDAP server 
(designed by the connectionURL option) is not present or the LDAP service is 
not available on this host, the application does not start, and the following 
log appears :
Exception performing authentication
javax.naming.CommunicationException: ldap-server1:389.
Root exception is java.net.ConnectException: Connection refused

I corrected this behaviour by modifying JNDIRealm.java as follows
OLD SOURCE ====================
        try {

            // Ensure that we have a directory context available
            context = new InitialDirContext(getDirectoryContextEnvironment());

        } catch (NamingException e) {
END OLD SOURCE ===================

NEW SOURCE ====================
        try {

            // Ensure that we have a directory context available
            context = new InitialDirContext(getDirectoryContextEnvironment());

        } catch (Exception e) {
END NEW SOURCE ====================

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org