Hi,
I am working on a plugin for Solr, and in this project, a
QueryNodeException [1] is thrown in the case of an error while parsing
the query.
However, I receive the following exception in such a case:
HTTP Status 500 - Can't find bundle for base name
org.apache.lucene.queryParser.core.messages.QueryParserMessages,
locale en_IE java.util.MissingResourceException: Can't find bundle
for base name
org.apache.lucene.queryParser.core.messages.QueryParserMessages,
locale en_IE at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
.....
It seems that this is because my solr app cannot find a ressource bundle
while writing the exception message. Lucene supports
internationalization in query's exception messages thanks to the NLS [2]
class.
It should search for terms in the default property file
*org/apache/lucene/queryParser/core/messages/QueryParserMessages.properties*,
which is set in [1], in the case of the property file in the current
locale missing, in my case "en_IE".
Creating the file with the current local, i.e.,
org/apache/lucene/queryParser/core/messages/QueryParserMessages*_en_IE*.properties,
and putting it into a jar placed in the lib folder of my solr app
changed nothing.
Would you know why the default property file is not seen ? What would be
the required steps to add internationalization support in Solr ? Or, at
least, to remove the "bundle" exception ?
Regards,
[1]
http://lucene.apache.org/java/3_1_0/api/contrib-queryparser/org/apache/lucene/queryParser/core/QueryNodeException.html
[2]
http://lucene.apache.org/java/3_1_0/api/core/org/apache/lucene/messages/NLS.html
--
Campinas Stéphane