* class cannot be loaded, a debug level log message will be written to the
* Container's log and null will be returned.
*/
public static Class<?> loadClass(Context context, String className) {
ClassLoader cl = context.getLoader().getClassLoader();
Log log = context.getLogger();
Class<?> clazz = null;
try {
clazz = cl.loadClass(className);
} catch (ClassNotFoundException e) {
log.debug(sm.getString("introspection.classLoadFailed"), e);
} catch (NoClassDefFoundError e) {
log.debug(sm.getString("introspection.classLoadFailed"), e);
} catch (ClassFormatError e) {
log.debug(sm.getString("introspection.classLoadFailed"), e);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("introspection.classLoadFailed"), t);
}
return clazz;
}