You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2011/06/12 15:03:09 UTC

NPE on startup when you comment out the queries in firstSearcher

I think this has been around forever (I'm seeing it in 1.4.1 too), but
I just happened to notice it. If you comment out the <arr
name="queries"> section in firstSearcher, you get an NPE as below:

Any reason I shouldn't make a patch and even apply it when I get my
credentials? It's a trivial fix, just return if the list is null.

Erick


SEVERE: java.lang.NullPointerException
	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:47)
	at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1117)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)

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


Re: NPE on startup when you comment out the queries in firstSearcher

Posted by Erick Erickson <er...@gmail.com>.
Starting with "svn delete" <G>?

"How soon will they rue the day they gave me any power?"


Erick

On Sun, Jun 12, 2011 at 9:37 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Sun, Jun 12, 2011 at 9:03 AM, Erick Erickson <er...@gmail.com> wrote:
>> I think this has been around forever (I'm seeing it in 1.4.1 too), but
>> I just happened to notice it. If you comment out the <arr
>> name="queries"> section in firstSearcher, you get an NPE as below:
>>
>> Any reason I shouldn't make a patch and even apply it when I get my
>> credentials? It's a trivial fix, just return if the list is null.
>
> +1
> Since the effect is to get rid of an exception in the logs, this
> doesn't really even need a CHANGES entry or anything IMO.
> Commit away when you can!  Then merge it back to the 3x branch to
> brush up on your svn skills ;-)
>
> -Yonik
> http://www.lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

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


Re: NPE on startup when you comment out the queries in firstSearcher

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Jun 12, 2011 at 9:03 AM, Erick Erickson <er...@gmail.com> wrote:
> I think this has been around forever (I'm seeing it in 1.4.1 too), but
> I just happened to notice it. If you comment out the <arr
> name="queries"> section in firstSearcher, you get an NPE as below:
>
> Any reason I shouldn't make a patch and even apply it when I get my
> credentials? It's a trivial fix, just return if the list is null.

+1
Since the effect is to get rid of an exception in the logs, this
doesn't really even need a CHANGES entry or anything IMO.
Commit away when you can!  Then merge it back to the 3x branch to
brush up on your svn skills ;-)

-Yonik
http://www.lucidimagination.com

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


Re: NPE on startup when you comment out the queries in firstSearcher

Posted by Mark Miller <ma...@gmail.com>.
Perhaps a JIRA issue, changes entry, and maybe a unit test if it's simple and makes sense - otherwise, commit away!

For really trivial stuff, one or all of those steps have been skipped in the past.

Otherwise, it's up to you to determine what you feel safe committing and what you are willing to be held accountable for ;)

On Jun 12, 2011, at 3:03 PM, Erick Erickson wrote:

> I think this has been around forever (I'm seeing it in 1.4.1 too), but
> I just happened to notice it. If you comment out the <arr
> name="queries"> section in firstSearcher, you get an NPE as below:
> 
> Any reason I shouldn't make a patch and even apply it when I get my
> credentials? It's a trivial fix, just return if the list is null.
> 
> Erick
> 
> 
> SEVERE: java.lang.NullPointerException
> 	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:47)
> 	at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1117)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:680)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 

- Mark Miller
lucidimagination.com









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