You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Ravi Verma <ra...@gmail.com> on 2018/04/18 23:29:37 UTC

Can't find resource 'currency.xml' in classpath | currencyFieldType

Hello Team,

I am facing an issue on solr search version 7.x. I want to create a
currencyFIeldType in my managed-schema file. In order to do that I created
the following entries :

 *  <fieldType name="currency" class="solr.CurrencyFieldType"  *
*           amountLongSuffix="_l_ns" codeStrSuffix="_s_ns"*
*           defaultCurrency="USD" currencyConfig="currency.xml" />*


*    <dynamicField name="*_s_ns"  type="string"  indexed="true"
 stored="true" />*
*    <dynamicField name="*_l_ns"  type="plong"   indexed="true"
 stored="true"/>*

When I restart solr every time I get this exception :

* at
org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:173)*
* at
org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:45)*
* at
org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75)*
* at
org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:119)*
* at
org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:92)*
* ... 11 more*
*Caused by: org.apache.solr.core.SolrResourceNotFoundException: Can't find
resource 'currency.xml' in classpath or
'/home/ravi/Desktop/solr/solr-7.2.1/server/solr/192.168.9.154
<http://192.168.9.154>'*
* at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:407)*
* at
org.apache.solr.schema.FileExchangeRateProvider.reload(FileExchangeRateProvider.java:167)*
* ... 21 more*

Please help me on this asap, I have a project pending at my end.

Thanks & Regards
Ravi Verma

Re: Can't find resource 'currency.xml' in classpath | currencyFieldType

Posted by Chris Hostetter <ho...@fucit.org>.
: I am facing an issue on solr search version 7.x. I want to create a
: currencyFIeldType in my managed-schema file. In order to do that I created
: the following entries :
: 
:  *  <fieldType name="currency" class="solr.CurrencyFieldType"  *
: *           amountLongSuffix="_l_ns" codeStrSuffix="_s_ns"*
: *           defaultCurrency="USD" currencyConfig="currency.xml" />*

that configuration instructs this instance of CurrencyFieldType to use a 
local file named "currency.xml" in order to know what the exchange rates 
are between the various currencies it encounters.

: When I restart solr every time I get this exception :
	...
: *Caused by: org.apache.solr.core.SolrResourceNotFoundException: Can't find
: resource 'currency.xml' in classpath or

...that error indicates that CurrencyFieldType can not find the file 
'currency.xml' file you told it to use.

Please review the docs for information on the various options for how to 
specify the exchange rates...

https://lucene.apache.org/solr/guide/7_3/working-with-currencies-and-exchange-rates.html



-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org