LOG.log(Level.WARNING,
"Error parsing ldap url of TopologyCacheException.", t);
h = INFO_NOT_AVAILABLE_LABEL.get().toString();
p = -1;
}
throw new UserDataCertificateException(
Step.REPLICATION_OPTIONS,
INFO_CERTIFICATE_EXCEPTION.get(
h, String.valueOf(p)),
e.getCause(), h, p,
e.getTrustManager().getLastRefusedChain(),
e.getTrustManager().getLastRefusedAuthType(), excType);
}
}
}
exceptionMsgs.add(getMessage(e));
}
if (exceptionMsgs.size() > 0)
{
Message confirmationMsg =
INFO_ERROR_READING_REGISTERED_SERVERS_CONFIRM.get(
getMessageFromCollection(exceptionMsgs, "\n"));
throw new UserDataConfirmationException(Step.REPLICATION_OPTIONS,
confirmationMsg);
}
}
else
{
updateUserDataWithSuffixesInServer(ctx);
}
}
catch (UserDataException ude)
{
throw ude;
}
catch (Throwable t)
{
LOG.log(Level.INFO, "Error connecting to remote server.", t);
if (isCertificateException(t))
{
UserDataCertificateException.Type excType;
ApplicationTrustManager.Cause cause =
trustManager.getLastRefusedCause();
LOG.log(Level.INFO, "Certificate exception cause: "+cause);
if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED)
{
excType = UserDataCertificateException.Type.NOT_TRUSTED;
}
else if (cause == ApplicationTrustManager.Cause.HOST_NAME_MISMATCH)
{
excType = UserDataCertificateException.Type.HOST_NAME_MISMATCH;
}
else
{
excType = null;
}
if (excType != null)
{
throw new UserDataCertificateException(Step.REPLICATION_OPTIONS,
INFO_CERTIFICATE_EXCEPTION.get(host, String.valueOf(port)), t,
host, port, trustManager.getLastRefusedChain(),
trustManager.getLastRefusedAuthType(), excType);
}
else