Initialize Tika when the core module is loaded.

This commit is contained in:
esaunders 2019-06-17 13:34:30 -04:00
parent 2e96f870d0
commit 16eca8ca9f

View File

@ -46,6 +46,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
/**
* Wrapper over Installers in packages in Core module. This is the main
@ -226,6 +227,21 @@ public class Installer extends ModuleInstall {
packageInstallers.add(org.sleuthkit.autopsy.ingest.Installer.getDefault());
packageInstallers.add(org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.getDefault());
packageInstallers.add(org.sleuthkit.autopsy.healthmonitor.Installer.getDefault());
/**
* This is a temporary workaround for the following bug in Tika that
* results in a null pointer exception when used from the Image Gallery.
* The current hypothesis is that the Image Gallery is cancelling the
* thumbnail task that Tika initialization is happening on. Once the
* Tika issue has been fixed we should no longer need this workaround.
*
* https://issues.apache.org/jira/browse/TIKA-2896
*/
try {
FileTypeDetector fileTypeDetector = new FileTypeDetector();
} catch (FileTypeDetector.FileTypeDetectorInitException ex) {
logger.log(Level.SEVERE, "Failed to load file type detector.", ex);
}
}
/**