This commit is contained in:
Alessandro Pieve 2016-07-14 10:41:57 +00:00
parent 757c589f4c
commit f0339d3cbd
2 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,7 @@
package org.gcube.documentstore.persistence;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
@ -53,7 +54,11 @@ public abstract class PersistenceBackendConfiguration {
logger.trace("{} will be used.", foundConfigurationClassName);
return configuration;
} catch (Exception e) {
}
catch (InvocationTargetException e) {
logger.error(String.format("InvocationTargetException -%s not initialized correctly. It will not be used. Trying the next one if any.", foundConfiguration.getClass().getSimpleName()), e.getCause());
}
catch (Exception e) {
logger.error(String.format("%s not initialized correctly. It will not be used. Trying the next one if any.", foundConfiguration.getClass().getSimpleName()), e);
}
}

View File

@ -128,7 +128,8 @@ public abstract class PersistenceBackendFactory {
found.setFallback(createFallback(context));
return found;
} catch (Exception e) {
}
catch (Exception e) {
logger.error(String.format("%s not initialized correctly. It will not be used. Trying the next one if any.", foundClass.getSimpleName()), e);
}
}