lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Inserting shards in overridden SearchComponent prepare method yields null pointer
Date Tue, 01 Jun 2010 22:47:17 GMT

Wild shot in the dark: if the list of shards is changed between prepare 
method and hte process method of the QueryComponent that could tickle some 
code path that was never expected, and maybe trigger an NPE (ie: looking 
up some IDs in a map keyed off of shard and now the shard is something 
that never had a value put in that map) ... so it really dpeends where 
your component is registered in the component list.

like i said: wild shot i nthe dark.  you ahven't posted a lot of details 
(for instance: i assume that stack trace is coming from the shard, not the 
collator -- but again that's just a guess)

: Date: Tue, 1 Jun 2010 13:20:20 -0700
: From: Jason Rutherglen <>
: Reply-To:
: To:
: Subject: Inserting shards in overridden SearchComponent prepare method yields 
:      null pointer
: The insert shards code is as follows:
: ModifiableSolrParams modParams = new ModifiableSolrParams(params);
: modParams.set("shards", shards);
: rb.req.setParams(modParams);
: Where shards is a valid single shard pseudo URL.
: Stacktrace:
: HTTP Status 500 - null java.lang.NullPointerException at
: org.apache.solr.handler.component.QueryComponent.createRetrieveDocs(
: at org.apache.solr.handler.component.QueryComponent.distributedProcess(
: at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
: at org.apache.solr.handler.RequestHandlerBase.handleRequest(
: at org.apache.solr.core.SolrCore.execute( at
: org.apache.solr.servlet.SolrDispatchFilter.execute(
: at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
: at


View raw message