Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-6120: zkcli.sh should expand solr.war automatically instead of throwing ClassNotFoundException

Shalin Shekhar Mangar75e8b848e8be
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 596d63ec334..2765c3c1741 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -139,6 +139,9 @@ Bug Fixes
* SOLR-6118: 'expand.sort' didn't support function queries. (David Smiley)
+* SOLR-6120: zkcli.sh should expand solr.war automatically instead of throwing
+ ClassNotFoundException. (sebastian badea, shalin)
+
Other Changes
---------------------
diff --git a/solr/example/scripts/cloud-scripts/zkcli.sh b/solr/example/scripts/cloud-scripts/zkcli.sh
index 15b5392d2e5..3110898ea9e 100755
--- a/solr/example/scripts/cloud-scripts/zkcli.sh
+++ b/solr/example/scripts/cloud-scripts/zkcli.sh
@@ -9,5 +9,9 @@ JVM="java"
sdir="`dirname \"$0\"`"
+if [ ! -d "$sdir/../../solr-webapp/webapp" ]; then
+ unzip $sdir/../../webapps/solr.war -d $sdir/../../solr-webapp/webapp
+fi
+
PATH=$JAVA_HOME/bin:$PATH $JVM -Dlog4j.configuration=file:$sdir/log4j.properties -classpath "$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"}