mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
21.09.2007 ed1c23f62597ba2fcf725b480289f95a55b0c1ff
Fix for 2320.

Updated the message to show the details at the end.
Identify if we are having a problem with the certificate and have an specific message on this c
ase.

4 files modified
68 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/quicksetup.properties 6 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/Application.java 16 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java 42 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -4163,12 +4163,12 @@
    if (Utils.isCertificateException(ne))
    {
      msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get(
              hostPort, ne.toString());
              hostPort, ne.toString(true));
    }
    else
    {
       msg = INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
          hostPort, ne.toString());
          hostPort, ne.toString(true));
    }
    return msg;
  }
opends/src/messages/messages/quicksetup.properties
@@ -79,9 +79,9 @@
 the rights to access it.
INFO_CANNOT_CONNECT_TO_REMOTE_AUTHENTICATION=The provided credentials are not \
 valid.
INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC=Could not connect to %s. The error \
 message received is:%n%s%nCheck that the server is running and that the \
 provided credentials are valid.
INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC=Could not connect to %s.  Check that the \
 server is running and that the provided credentials are valid.%nError \
 details:%n%s
INFO_CANNOT_CONNECT_TO_REMOTE_PERMISSIONS=You do not have enough access \
 rights to read the configuration in %s. %nProvide credentials with enough \
 rights.
opends/src/quicksetup/org/opends/quicksetup/Application.java
@@ -719,10 +719,18 @@
    }
    catch (NamingException ne)
    {
      Message errorMessage = INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
          server.getHostPort(true), ne.toString(true));
      throw new ApplicationException(
          ReturnCode.CONFIGURATION_ERROR, errorMessage,
      Message msg;
      if (Utils.isCertificateException(ne))
      {
        msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get(
            server.getHostPort(true), ne.toString(true));
      }
      else
      {
         msg = INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
             server.getHostPort(true), ne.toString(true));
      }
      throw new ApplicationException(ReturnCode.CONFIGURATION_ERROR, msg,
          ne);
    }
    return ctx;
opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -61,6 +61,8 @@
import org.opends.admin.ads.TopologyCacheException;
import org.opends.admin.ads.util.ApplicationTrustManager;
import org.opends.quicksetup.ui.*;
import org.opends.quicksetup.util.Utils;
import static org.opends.quicksetup.util.Utils.*;
import static org.opends.quicksetup.Step.*;
import org.opends.quicksetup.*;
@@ -1801,11 +1803,19 @@
      }
      catch (NamingException ne)
      {
        throw new ApplicationException(
                ReturnCode.CONFIGURATION_ERROR,
                INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
                        server.getHostPort(true),
                        ne.getLocalizedMessage()), ne);
        Message msg;
        if (Utils.isCertificateException(ne))
        {
          msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get(
              server.getHostPort(true), ne.toString(true));
        }
        else
        {
           msg = INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
               server.getHostPort(true), ne.toString(true));
        }
        throw new ApplicationException(ReturnCode.CONFIGURATION_ERROR, msg,
            ne);
      }
      finally
      {
@@ -1857,11 +1867,19 @@
          }
          catch (NamingException ne)
          {
            throw new ApplicationException(
                ReturnCode.CONFIGURATION_ERROR,
                INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
                        server.getHostPort(true),
                        ne.getLocalizedMessage()), ne);
            Message msg;
            if (Utils.isCertificateException(ne))
            {
              msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get(
                  server.getHostPort(true), ne.toString(true));
            }
            else
            {
               msg = INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
                   server.getHostPort(true), ne.toString(true));
            }
            throw new ApplicationException(ReturnCode.CONFIGURATION_ERROR, msg,
                ne);
          }
          finally
          {
@@ -2096,7 +2114,7 @@
        throw new ApplicationException(
                ReturnCode.CONFIGURATION_ERROR,
                INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
                        getHostDisplay(auth), ne.getLocalizedMessage()), ne);
                        getHostDisplay(auth), ne.toString(true)), ne);
      }
      else
      {
@@ -3008,7 +3026,7 @@
      else if (t instanceof NamingException)
      {
        errorMsgs.add(INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC.get(
                host+":"+port, t.toString()));
                host+":"+port, ((NamingException)t).toString(true)));
        qs.displayFieldInvalid(FieldName.REMOTE_SERVER_HOST, true);
        qs.displayFieldInvalid(FieldName.REMOTE_SERVER_PORT, true);
        qs.displayFieldInvalid(FieldName.REMOTE_SERVER_DN, true);