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