Class adapterClass = loadClass(className, ignoreErrors);
if (adapterClass != null) {
try {
Method method = adapterClass.getMethod("newInstance", NEWINSTANCE_PARAMETER_TYPES);
PersistenceAdapter answer = (PersistenceAdapter) method.invoke(null, new Object[]{directory});
log.info("Using persistence adapter: " + adapterClass.getName());
return answer;
}
catch (InvocationTargetException e) {
Throwable cause = e.getTargetException();