You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by "NG-Marketing, Matthias Schneider" <sc...@ng-marketing.com> on 2006/09/17 21:16:15 UTC
java.lang.NullPointerException
Hello List,
i installed nutch 0.8 and i can fetch and index documents, but I can not
search them. I get the following error:
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at
org.apache.nutch.searcher.LuceneQueryOptimizer$LimitedCollector.<init>(Lucen
eQueryOptimizer.java:108)
at
org.apache.nutch.searcher.LuceneQueryOptimizer.optimize(LuceneQueryOptimizer
.java:244)
at
org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:95)
at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:249)
at org.apache.jsp.search_jsp._jspService(search_jsp.java:255)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
24)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)
PLEASE HELP
Re: java.lang.NullPointerException
Posted by Tomi NA <he...@gmail.com>.
On 9/18/06, NG-Marketing, M.Schneider <sc...@ng-marketing.com> wrote:
> I figured it out. I used in my nutch-site.xml the following config
>
> <property>
> <name>searcher.max.hits</name>
> <value>2048</value>
> ....
>
> If I change the value to nothing "" it works all fine. It took me a couple
> of hours to figure it out. This might be a bug.
Is the specific value (2048) a problem or does nutch throw a NPE
regardless of the value you use?
t.n.a.
Re: java.lang.NullPointerException
Posted by Andrzej Bialecki <ab...@getopt.org>.
NG-Marketing, M.Schneider wrote:
> I figured it out. I used in my nutch-site.xml the following config
>
> <property>
> <name>searcher.max.hits</name>
> <value>2048</value>
> ....
>
> If I change the value to nothing "" it works all fine. It took me a couple
> of hours to figure it out. This might be a bug.
>
This was a bug in LuceneQueryOptimizer.LimitedCollector - I fixed it now
in rev. 447359 (in branch-0.8) and in rev. 447363 (in trunk).
NOTE: you should NEVER use "searcher.max.hits" if you didn't run
IndexSorter on your index! If you use this setting and you run a
non-optimized index, then you will get random-quality results, because
after collecting that many hits (no matter if they are high- or
low-scoring) the searcher will stop collecting. In a sorted index, you
are more or less guaranteed to get highly-scoring hits first, so this
makes sense; but in a regular non-sorted index scores are distributed
randomly.
--
Best regards,
Andrzej Bialecki <><
___. ___ ___ ___ _ _ __________________________________
[__ || __|__/|__||\/| Information Retrieval, Semantic Web
___|||__|| \| || | Embedded Unix, System Integration
http://www.sigram.com Contact: info at sigram dot com
RE: java.lang.NullPointerException
Posted by "NG-Marketing, M.Schneider" <sc...@ng-marketing.com>.
I figured it out. I used in my nutch-site.xml the following config
<property>
<name>searcher.max.hits</name>
<value>2048</value>
....
If I change the value to nothing "" it works all fine. It took me a couple
of hours to figure it out. This might be a bug.
> -----Original Message-----
> From: Tomi NA [mailto:hefest@gmail.com]
> Sent: Monday, September 18, 2006 12:32 AM
> To: nutch-user@lucene.apache.org
> Subject: Re: java.lang.NullPointerException
>
> On 9/17/06, NG-Marketing, Matthias Schneider <sc...@ng-marketing.com>
> wrote:
> > Hello List,
> >
> >
> >
> > i installed nutch 0.8 and i can fetch and index documents, but I can not
> > search them. I get the following error:
> >
> >
> >
> > StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw
exception
> >
> > java.lang.NullPointerException
> >
> > at
> >
org.apache.nutch.searcher.LuceneQueryOptimizer$LimitedCollector.<init>(Lucen
> > eQueryOptimizer.java:108)
> >
> > at
> >
>
org.apache.nutch.searcher.LuceneQueryOptimizer.optimize(LuceneQueryOptimize
> r
> > .java:244)
> >
> > at
> > org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:95)
> >
> > at
org.apache.nutch.searcher.NutchBean.search(NutchBean.java:249)
> > [...snip...]
>
> Can't say I ran into a problem like that, but have you checked if your
> index is valid, i.e. can you open the index with luke
> (http://www.getopt.org/luke/) and run queries?
>
> t.n.a.
Re: java.lang.NullPointerException
Posted by Tomi NA <he...@gmail.com>.
On 9/17/06, NG-Marketing, Matthias Schneider <sc...@ng-marketing.com> wrote:
> Hello List,
>
>
>
> i installed nutch 0.8 and i can fetch and index documents, but I can not
> search them. I get the following error:
>
>
>
> StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
>
> java.lang.NullPointerException
>
> at
> org.apache.nutch.searcher.LuceneQueryOptimizer$LimitedCollector.<init>(Lucen
> eQueryOptimizer.java:108)
>
> at
> org.apache.nutch.searcher.LuceneQueryOptimizer.optimize(LuceneQueryOptimizer
> .java:244)
>
> at
> org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:95)
>
> at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:249)
> [...snip...]
Can't say I ran into a problem like that, but have you checked if your
index is valid, i.e. can you open the index with luke
(http://www.getopt.org/luke/) and run queries?
t.n.a.