Result result = getInitializedResult();
addErrorDetails(result, getVerifierContext().getComponentNameConstructor());
result.setStatus(Result.PASSED);
final PersistenceUnitDescriptor pu = PersistenceUnitDescriptor.class.cast(descriptor);
for(String className : pu.getClasses()) {
try {
Class.forName(className, false, getVerifierContext().getClassLoader());
} catch (ClassNotFoundException e) {
result.failed(smh.getLocalString(getClass().getName() + "failed1",
"Class [ {0} ] could not be loaded", new Object[]{className}));
} catch (NoClassDefFoundError e) {
result.failed(smh.getLocalString(getClass().getName() + "failed2",
"Class [ {0} ] could not be loaded " +
"because a dependent class could not be loaded. See reason:\n [ {1} ]",
new Object[]{className,e.getMessage()}));
}
}
return result;