You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Eric Pugh (Jira)" <ji...@apache.org> on 2024/12/14 12:35:00 UTC
[jira] [Commented] (SOLR-17029) SOLR_OPTS and '-a' both break with quoted/escaped whitespace
[ https://issues.apache.org/jira/browse/SOLR-17029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17905703#comment-17905703 ]
Eric Pugh commented on SOLR-17029:
----------------------------------
i took a run at it, messed with Shellcheck etc, but no joy, felt like I was making things worse...
While it would be nice to get this fixed, not sure I have the shell scripting chops for this one!
> SOLR_OPTS and '-a' both break with quoted/escaped whitespace
> ------------------------------------------------------------
>
> Key: SOLR-17029
> URL: https://issues.apache.org/jira/browse/SOLR-17029
> Project: Solr
> Issue Type: Bug
> Reporter: Chris M. Hostetter
> Priority: Major
>
> It's basically impossible to use an quoted/escaped whitespace in SOLR_OPTS.
> By the time {{java}} gets the args, the quoted/escaped whitespace has been treated as a break in the argument list, and the quote characters are treated as literals characters in the argument values...
> {noformat}
> $ SOLR_OPTS='-XX:-UseLargePages -Dfoo=bar -Dyak="white space"' ./bin/solr start -f
> Error: Could not find or load main class space"
> Caused by: java.lang.ClassNotFoundException: space"
> $ SOLR_OPTS="-XX:-UseLargePages -Dfoo=bar -Dyak=white\ space" ./bin/solr start -f
> Error: Could not find or load main class space
> Caused by: java.lang.ClassNotFoundException: space
> $ SOLR_OPTS='-XX:-UseLargePages -Dfoo=bar "-Dyak=white space"' ./bin/solr start -f
> Error: Could not find or load main class "-Dyak=white
> Caused by: java.lang.ClassNotFoundException: "-Dyak=white
> {noformat}
> The same problem affects the {{-a}} option...
> {noformat}
> $ SOLR_OPTS='-XX:-UseLargePages -Dfoo=bar' ./bin/solr start -f -a '-Dyak="white space"'
> Error: Could not find or load main class space"
> Caused by: java.lang.ClassNotFoundException: space"
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org