lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Lopes <A...@alunos.ipca.pt>
Subject Re: NullPointerException in IndexSearcher
Date Tue, 30 Nov 2004 13:03:43 GMT
Problem solved, it seems that it was some problem with the temporary 
files o tomcat.
Deleting the files from $TOMCAT_DIR/temp solved the problem

Ricardo Lopes wrote:

> i have a problem with IndexSearcher, in the following code i get a 
> NullPointerException when i try to create an IndexSearcher.
> Here is the code:
>
>   private static synchronized Searcher getSearcher( String indexDir ) 
> throws IOException
>   {
>       if( lastModified != IndexReader.lastModified( indexDir ) )
>       {
>           // there's a new index, open it
>           lastModified = IndexReader.lastModified( indexDir );
>           searcher = new IndexSearcher( indexDir );   <======== The 
> problem is in this line
>       }
>
>       return searcher;
>   }
>
>
> for some strange reason the searcher is null, the indexDir variable is 
> correctly set to the index directory.
>
> I try to reconstruct the index and i have no problems, but when i try 
> to search it i get the same error.
> This never happend before, there were no changes in the source code 
> and the search always worked, but today i get that error.
>
> There are no permission problems in the index files, all files are 
> owned by the same user.
> My java version is 1.4.1_02-b06.
>
> Any help would be appreciated.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>
>
>

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


Mime
View raw message