String msg = "Invalid authenticator configuration. Cannot read file - ".concat(authenticatorConfiguration);
log.error(msg);
throw new ServletException(msg);
}
AuthenticatorConfigurationReader authenticatorConfigurationReader
= new AuthenticatorConfigurationReader();
try {
authenticatorConfigurationReader.init(configurationFileStream);
} catch (IOException e) {
String msg = "Error reading authenticator configurations.";
log.error(msg, e);
throw new ServletException(msg, e);
} catch (ParserConfigurationException e) {
String msg = "Error parsing authenticator configurations.";
log.error(msg, e);
throw new ServletException(msg, e);
} catch (SAXException e) {
String msg = "Error parsing authenticator configurations.";
log.error(msg, e);
throw new ServletException(msg, e);
} finally {
try {
configurationFileStream.close();
} catch (IOException e) {
log.error("Error closing authenticator file stream.", e);
}
}
this.authenticatorList = authenticatorConfigurationReader.getAuthenticatorList();
if (this.authenticatorList.isEmpty()) {
String msg = "No authenticators registered in the system. System cannot function without authenticators";
log.error(msg);
throw new ServletException(msg);