From 711c958a04cda32c5b2546d7cb625dfc34ecb8aa Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Thu, 15 Oct 2015 15:40:59 -0400 Subject: [PATCH 1/2] Added baloon notification if KWS core creation fails --- .../org/sleuthkit/autopsy/keywordsearch/Bundle.properties | 1 + .../src/org/sleuthkit/autopsy/keywordsearch/Server.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index cbeb1a8438..b657f600a3 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -223,6 +223,7 @@ Server.connect.exception.msg=Failed to connect to Solr server\: Server.openCore.exception.msg=Core open requested, but server not yet running Server.openCore.exception.cantOpen.msg=Could not open Core Server.openCore.exception.cantOpen.msg2=Could not open Core +Server.openCore.exception.cantOpenForCase.msg=Could not open Keyword Search Core for case {0} Server.request.exception.exception.msg=Could not issue Solr request Server.commit.exception.msg=Could not commit index Server.addDoc.exception.msg=Could not add document to index via update handler\: {0} diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index 20e3f178ee..50d5e962bd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -626,7 +626,12 @@ public class Server { Case currentCase = Case.getCurrentCase(); - currentCore = openCore(currentCase); + try { + currentCore = openCore(currentCase); + } catch (KeywordSearchModuleException ex) { + MessageNotifyUtil.Notify.error(NbBundle.getMessage(Server.class, "Server.openCore.exception.cantOpenForCase.msg", currentCase.getName()), ex.getCause().getMessage()); + throw ex; + } serverAction.putValue(CORE_EVT, CORE_EVT_STATES.STARTED); } From f5a32922bfcdf66bf15e39ecec2df055feeae1dd Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Fri, 16 Oct 2015 10:57:05 -0400 Subject: [PATCH 2/2] Changed UI message text --- .../src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index b657f600a3..62a15c1517 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -223,7 +223,7 @@ Server.connect.exception.msg=Failed to connect to Solr server\: Server.openCore.exception.msg=Core open requested, but server not yet running Server.openCore.exception.cantOpen.msg=Could not open Core Server.openCore.exception.cantOpen.msg2=Could not open Core -Server.openCore.exception.cantOpenForCase.msg=Could not open Keyword Search Core for case {0} +Server.openCore.exception.cantOpenForCase.msg=Could not create keyword search index for case {0} Server.request.exception.exception.msg=Could not issue Solr request Server.commit.exception.msg=Could not commit index Server.addDoc.exception.msg=Could not add document to index via update handler\: {0}