Closed (fixed)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
solrconfig.xml
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2012 at 23:12 UTC
Updated:
24 Jan 2012 at 14:11 UTC
I get the following exception when starting Apache Solr with solrconfig.xml as supplied by the latest apachesolr Drupal module.
SEVERE: java.lang.NumberFormatException: For input string: "
1
"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:470)
at java.lang.Integer.<init>(Integer.java:636)
at org.apache.solr.util.SolrPluginUtils.calculateMinShouldMatch(SolrPluginUtils.java:701)
at org.apache.solr.util.SolrPluginUtils.setMinShouldMatch(SolrPluginUtils.java:662)
at org.apache.solr.search.DisMaxQParser.getUserQuery(DisMaxQParser.java:205)
at org.apache.solr.search.DisMaxQParser.addMainQuery(DisMaxQParser.java:162)
at org.apache.solr.search.DisMaxQParser.parse(DisMaxQParser.java:78)
at org.apache.solr.search.QParser.getQuery(QParser.java:142)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:101)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:54)
at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1181)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
I was able to fix this by cleaning up a configuration value to remove prefixed and suffixed spacing.
| Comment | File | Size | Author |
|---|---|---|---|
| solr-exception.diff | 496 bytes | thecarlhall |
Comments
Comment #1
thecarlhall commentedThis problem might be environmental but the fix should work in all JVMs.
Comment #2
nick_vhGood fix, committed this at once!
Comment #3
pwolanin commentedComment #4
nick_vhBackport will start over with Beta15 as a reference. Closing this one
Comment #5
nick_vhCommitted to 6.x-3.x
Comment #6
shenzhuxi commentedschema-solr3x.xml in 7.x-1.x also needs to be patched.
Comment #7
nick_vhDone at once. Thanks for reporting!