From 61ad099fe9881cd995d93b362ef87b9975e2d3e7 Mon Sep 17 00:00:00 2001 From: Shawn Heisey Date: Mon, 14 Jul 2014 17:31:14 +0000 Subject: [PATCH] SOLR-6120: Print a helpful error message from zkcli.bat when war is not extracted. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1610463 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 4 ++++ solr/example/scripts/cloud-scripts/zkcli.bat | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index a59d61ed227..6392ffef973 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -209,6 +209,10 @@ Other Changes * SOLR-6228: Fixed bug in TestReplicationHandler.doTestIndexAndConfigReplication. (shalin) +* SOLR-6120: On Windows, when the war is not extracted, the zkcli.bat script + will print a helpful message indicating that the war must be unzipped instead + of a java error about a missing class. + ================== 4.9.0 ================== Versions of Major Components diff --git a/solr/example/scripts/cloud-scripts/zkcli.bat b/solr/example/scripts/cloud-scripts/zkcli.bat index bbf6d603219..b7aa695b482 100644 --- a/solr/example/scripts/cloud-scripts/zkcli.bat +++ b/solr/example/scripts/cloud-scripts/zkcli.bat @@ -1,3 +1,4 @@ +@echo off REM You can override pass the following parameters to this script: REM @@ -8,4 +9,13 @@ REM Find location of this script set SDIR=%~dp0 if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% +IF exist %SDIR%\..\..\solr-webapp\webapp\nul ( + echo %SDIR%\....\..\solr-webapp\webapp exists +) ELSE ( + echo ------------------- + echo Unzip example\webapps\solr.war to example\solr-webapp\. to use this script. + echo Starting the Solr example via start.jar will also do this extraction. + echo ------------------- +) + "%JVM%" -Dlog4j.configuration="file:%SDIR%\log4j.properties" -classpath "%SDIR%\..\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\..\lib\ext\*" org.apache.solr.cloud.ZkCLI %*