return deserKnowledgebase(item,
cl);
} catch (ClassNotFoundException e) {
log.error("Unable to load rule base.",
e);
throw new DetailedSerializationException("A required class was not found.",
e.getMessage());
} catch (Exception e) {
log.error("Unable to load rule base.",
e);
log.info("...but trying to rebuild binaries...");
try {
BuilderResult res = repositoryModuleOperations.buildModule(item,
true);
if (res != null && res.getLines().size() > 0) {
log.error("There were errors when rebuilding the knowledgebase.");
throw new DetailedSerializationException("There were errors when rebuilding the knowledgebase.",
"");
}
} catch (Exception e1) {
log.error("Unable to rebuild the rulebase: " + e.getMessage());
throw new DetailedSerializationException("Unable to rebuild the rulebase.",
e.getMessage());
}
try {
return deserKnowledgebase(item,
cl);
} catch (Exception e2) {
log.error("Unable to reload knowledgebase: " + e.getMessage());
throw new DetailedSerializationException("Unable to reload knowledgebase.",
e.getMessage());
}
}
}