diff --git a/src/main/java/jp/sf/fess/exec/Crawler.java b/src/main/java/jp/sf/fess/exec/Crawler.java index 510fe4717..341b339d2 100644 --- a/src/main/java/jp/sf/fess/exec/Crawler.java +++ b/src/main/java/jp/sf/fess/exec/Crawler.java @@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import jp.sf.fess.Constants; +import jp.sf.fess.FessSystemException; import jp.sf.fess.db.allcommon.CDef; import jp.sf.fess.helper.CrawlingSessionHelper; import jp.sf.fess.helper.DataIndexHelper; @@ -378,6 +379,10 @@ public class Crawler implements Serializable { final SolrGroup updateSolrGroup = solrGroupManager .getSolrGroup(QueryType.ADD); + if (!updateSolrGroup.isActive(QueryType.ADD)) { + throw new FessSystemException("SolrGroup " + + updateSolrGroup.getGroupName() + " is not available."); + } // setup path mapping final List ptList = new ArrayList(); @@ -506,7 +511,7 @@ public class Crawler implements Serializable { return exitCode; } catch (final Throwable t) { // NOPMD - logger.warn("Interrupted a crawl task.", t); + logger.warn("An exception occurs on the crawl task.", t); return Constants.EXIT_FAIL; } finally { pathMappingHelper.removePathMappingList(options.sessionId); diff --git a/src/main/java/jp/sf/fess/helper/SystemHelper.java b/src/main/java/jp/sf/fess/helper/SystemHelper.java index cc29e543a..cba29bde8 100644 --- a/src/main/java/jp/sf/fess/helper/SystemHelper.java +++ b/src/main/java/jp/sf/fess/helper/SystemHelper.java @@ -295,7 +295,7 @@ public class SystemHelper implements Serializable { + " - Crawler Process Output:\n" + it.getOutput()); } if (exitValue != 0) { - throw new FessSystemException("Exit code is " + exitValue + throw new FessSystemException("Exit Code: " + exitValue + "\nOutput:\n" + it.getOutput()); } } catch (final FessSystemException e) {