Bean class test.
Verify that the bean class exist and is loadable.
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
// verify that the bean class exist and is loadable
try {
Class.forName(descriptor.getEjbClassName(), false, getVerifierContext().getClassLoader());
result.addGoodDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"Bean class [ {0} ] exist and is loadable.",
new Object[] {descriptor.getEjbClassName()}));
} catch (NoClassDefFoundError e) {
// e.printStackTrace();
logger.log(Level.FINE, "Can't find class " + e.getMessage());
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Error: Bean class [ {0} ] does not exist or is not loadable.",
new Object[] {descriptor.getEjbClassName()}));
} catch (ClassNotFoundException e) {
Verifier.debug(e);
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Error: Bean class [ {0} ] does not exist or is not loadable.",
new Object[] {descriptor.getEjbClassName()}));
} catch (Exception e) {
// e.printStackTrace();
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Error: Bean class [ {0} ] does not exist or is not loadable.",
new Object[] {descriptor.getEjbClassName()}));
}
return result;