You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Timothy Potter (JIRA)" <ji...@apache.org> on 2015/06/05 18:54:01 UTC
[jira] [Created] (SOLR-7641) bin/solr script checks for the
presence of the JAR command before resolving java (where it might also find
jar)
Timothy Potter created SOLR-7641:
------------------------------------
Summary: bin/solr script checks for the presence of the JAR command before resolving java (where it might also find jar)
Key: SOLR-7641
URL: https://issues.apache.org/jira/browse/SOLR-7641
Project: Solr
Issue Type: Bug
Affects Versions: 5.1, 5.0, 5.2
Reporter: Timothy Potter
Fix For: 5.3
I have SOLR_JAVA_HOME set to point to a valid JDK in my bin/solr.in.sh
{code}
SOLR_JAVA_HOME="/home/ubuntu/jdk1.8.0_45"
{code}
Note: I do not have JAVA_HOME set in my environment nor is it in my PATH.
And yet, when I run bin/solr, I get the following error:
{code}
$ bin/solr start -cloud -p 8984 -d cloud84 -f
This script requires extracting a WAR file with either the jar or unzip utility, please install these utilities or contact your administrator for assistance.
{code}
I think this code in bin/solr should be after the script resolves the location of "java" so it can check there for "jar" and use that rather than failing the script as it's doing now.
{code}
if hash jar 2>/dev/null ; then # hash returns true if jar is on the path
UNPACK_WAR_CMD=("$(command -v jar)" xf)
elif hash unzip 2>/dev/null ; then # hash returns true if unzip is on the path
UNPACK_WAR_CMD=("$(command -v unzip)" -q)
else
echo -e "This script requires extracting a WAR file with either the jar or unzip utility, please install these utilities or contact your administrator for assistance."
exit 1
fi
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org