lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Gilchrest - Sun Microsystems <Donald.Gilchr...@Sun.COM>
Subject Re: Web demo example: Errors from Tomcat startup
Date Fri, 08 Feb 2002 15:25:55 GMT
Hi Andy,

Thanks for clarifying the demo instructions!

Now, what about the NPE that Ken Munro cited (included below)?  I'm
encountering this too:

dpg% cd $TOMCAT_HOME/webapps/
dpg% java -verbose org.apache.lucene.demo.IndexHTML -create -index 
/opt/lucene/index
...
[Loaded java.io.RandomAccessFile from /usr/local/j2sdk1_3_1_02/jre/lib/rt.jar]
 caught a class java.lang.NullPointerException
 with message: null

Could that be related to the NPE problem discussed in the "PhraseQuery:
NullPointerException" thread, for which Ian offered a possible
solution, included here:

> Date: Fri, 08 Feb 2002 12:08:25 +0000
> From: Ian Lea <ian.lea@blackwell.co.uk>
> Subject: Re: PhraseQuery: NullPointerException
> 1.2-rc3 seems to generate NPE if one or more of the words in
> the search phrase are not present in the index.
> Works as expected, no NPE, with 1.2-rc2.
> 
> If change method seek() in org.apache.lucene.index.SegmentTermPositions from
> 
>   final void seek(TermInfo ti) throws IOException {
>     super.seek(ti);
>     proxStream.seek(ti.proxPointer);
>   }
> 
> to
> 
>   final void seek(TermInfo ti) throws IOException {
>     super.seek(ti);
>     if (ti != null) {
> 	proxStream.seek(ti.proxPointer);
>     }
>   }
> 
> the NPE goes away.  But I don't know what is going on here so
> this may well not be the correct solution.
> 
> --
> Ian.
> ian.lea@blackwell.co.uk

Thanks again for your help with this.

-don

> Date: Wed, 06 Feb 2002 20:29:16 -0400
> From: Ken Munro <ken@mainsail.ca>
> ...
> When I run "java org.apache.lucene.demo.IndexHTML -create -index 
/opt/lucene/index",
> I get a null pointer exception (using either JDK 1.2 or 1.3). I am running Red 
Hat 7.1,
> with the Sun JDKs.
> 
> I set up this script to run it:
> #!/bin/bash
> /usr/java/jdk1.3.1_02/bin/java -verbose -cp 
/usr/java/lucene-1.2-rc3-bin/lucene-1.2-rc3.jar:/usr/java/lucene-1.2-rc3-bin/luc
ene-demos-1.2-rc3.jar org.apache.lucene.demo.IndexHTML -create -index 
/opt/lucene/index
> 
> And here is the (verbose--hope its not too much) output:
> ...
> [Loaded java.io.RandomAccessFile from /usr/java/jdk1.3.1_02/jre/lib/rt.jar]
>  caught a class java.lang.NullPointerException
>  with message: null
> [Loaded java.lang.Shutdown$Lock from /usr/java/jdk1.3.1_02/jre/lib/rt.jar]
> 
> Thanks for all your help.
> 
> Cheers.
> 
> Ken Munro
> 
> --
> Ken Munro
> Main Sail Productions
> http://www.mainsail.ca/
> ken@mainsail.ca
> 902.431.WWW3
> 
> --


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message