// String ext = extList.next();
try{
extclass = Class.forName(ext);
}
catch(Exception e){
ResultException ex = new ResultException();
ex.result.addResult(Result.FATAL,"Couldn't load schemaExtension class: " + ext);
ex.result.lastResult().moreMessages(e.getMessage());
ex.result.lastResult().moreMessages(DebugInfo.extractTheStack(e));
throw(ex);
}
int lastDot = ext.lastIndexOf(".");
String className = ext.substring(lastDot + 1);
if (extensions.get(className) == null){
SchemaExtensionIF extInstance = null;
// We don't have the extension yet, try to instantiate it
try{
extInstance = (SchemaExtensionIF) extclass.newInstance();
}
catch(Exception e){
ResultException ex = new ResultException();
ex.result.addResult(Result.FATAL,"Couldn't instantiate Java class: " + ext);
ex.result.lastResult().moreMessages("This may be because the class doesn't have a constructor that takes no arguments.");
ex.result.lastResult().moreMessages("Or it may be that the class doesn't implement the SchemaExtensionIF interface.");
throw(ex);
}