Class<E> type;
try {
type = (Class<E>)conf.getClass(KITE_TYPE, GenericData.Record.class);
} catch (RuntimeException e) {
if (e.getCause() instanceof ClassNotFoundException) {
throw new TypeNotFoundException(String.format(
"The Java class %s for the entity type could not be found",
conf.get(KITE_TYPE)),
e.getCause());
} else {
throw e;