[ 
https://issues.apache.org/jira/browse/SOLR-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-5350:
---------------------------

    Attachment: solr-home-tmp-test.zip

bq. one of our sysadmins while configuring a production install had changed it 
to $\{dataDir\} about a year ago. I'm not sure what was his reasoning to change 
it into that, or what was the original source of that syntax then, but 
apparently it worked. 

The example snipped you posted really doesn't make any sense in terms of what 
you are suggesting though: that Solr was implicitly defining a "$\{dataDir\}" 
variable you could use in the config to refer to whatever {{<dataDir/>}} was in 
use -- because in your snippet, you use the "$\{dataDir\}" variable to 
configure the  {{<dataDir/>}} -- so there would be some circular logic going on 
there.

I am almost 100% certain that if this "$\{dataDir\}" variable was working for 
you in the past, it was because your java process was configured to set a 
"dataDir" system property explicitly when starting up the JVM, and for some 
reason when you upgraded to Solr 4.5 you changed something else so that this 
system proeprty is no longer defined.

---

To verify that no pre 4.5 versions of Solr 4.x were defining an implicit 
"$\{dataDir\}" variable, I created a minimal test solr-home (see attached zip) 
based on the solrconfig.xml that you provided and tested it with Solr 4.1, 
4.2.1, and 4.4. In all cases i got the same error...

{noformat}
SolrException: Could not load config for solrconfig.xml
...
Caused by: org.apache.solr.common.SolrException: No system property or default 
value specified for dataDir value:${dataDir}
{noformat}

I strongly suggest you go double check how you had Solr configured before you 
upgraded to 4.5.

> Solr 4.5 upgrade instructions don't mention that solrconfig.xml dataDir 
> variable must now be in another format.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5350
>                 URL: https://issues.apache.org/jira/browse/SOLR-5350
>             Project: Solr
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 4.5
>         Environment: All
>            Reporter: Juha Haaga
>            Priority: Minor
>              Labels: documentation
>             Fix For: 4.5.1
>
>         Attachments: solr-home-tmp-test.zip
>
>
> The configuration of dataDir in solrconfig.xml used to support ${dataDir} 
> format at least in all the previous 4.* releases, but in 4.5 that is no 
> longer true. Using the old format produces exception: 
> SolrException: No system property or default value specified for dataDir 
> value:${dataDir}
> The new format for the variable is ${solr.corename.data.dir:} where corename 
> is defined in solr.xml. This deprecation is not mentioned in the upgrade 
> instructions.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to