} catch (NoSuchMethodException e) {
LOGGER.error("failed-to-create-class",
handlerClass,
e);
}
ReportHandler reportHandler = null;
try {
Object[] args = new Object[2];
args[0] = buildGenericMap(genericHandler);
args[1] = report.getBinding();
reportHandler = (ReportHandler) con.newInstance(args);
} catch (InstantiationException e) {
LOGGER.error("failed-to-load-class",
handlerClass,
e);
} catch (IllegalAccessException e) {
LOGGER.error("failed-to-load-class",
handlerClass,
e);
} catch (InvocationTargetException e) {
LOGGER.error("failed-to-load-class",
handlerClass,
e);
}
handlers.put(report.getBinding(), reportHandler);
} catch (Exception e) {
LOGGER.error("failed-to-load-class", className);
}
} else if (report.getSqlHandler() != null) {
if (existsDatasourceDefinition(
datasourceConfigs, report.getSqlHandler())) {
ConnectionStrategy connStrategy =
DatasourceManager.getInstance().createConnectionStrategy(
(DatasourceConfiguration) datasourceConfigs.get(
report.getSqlHandler().getDatasourceName()));
ReportHandler handler =
new JDBCReportHandler(connStrategy, report);
handlers.put(report.getBinding(), handler);
} else {
LOGGER.error("sql-handler-datasource-not-found",
new Object[] {report.getSqlHandler().getDatasourceName(),