lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Null Pointer Exception in clone method of TermVectorsReader class!
Date Tue, 14 Dec 2004 06:27:43 GMT
Samir,

Can you reproduce this with the very latest Lucene from CVS?
If you can, could you write a little class that reproduces this
exception and stick it in Bugzilla, please?

I'm using Term Vectors on simpy.com, and I haven't had any issues with
them.

Thanks,
Otis


--- ABDOU Samir <samir.abdou@unine.ch> wrote:

> 
> Hello everybody,
> 
> I got the null pointer exception in the method clone of the
> TermVectorsReader class. Exactly in the given statement:    
> clone.tvx = (IndexInput) tvx.clone();
> 
> This happens when trying to indexing.
> 
> I think that is due to the constructor of that class. 
> 
>   TermVectorsReader(Directory d, String segment, FieldInfos
> fieldInfos)
>     throws IOException {
>     if (d.fileExists(segment + TermVectorsWriter.TVX_EXTENSION)) {
>       tvx = d.openInput(segment + TermVectorsWriter.TVX_EXTENSION);
>       checkValidFormat(tvx);
>       tvd = d.openInput(segment + TermVectorsWriter.TVD_EXTENSION);
>       tvdFormat = checkValidFormat(tvd);
>       tvf = d.openInput(segment + TermVectorsWriter.TVF_EXTENSION);
>       tvfFormat = checkValidFormat(tvf);
>       size = (int) tvx.length() / 8;
>     }
> ->    else {
> ->    	System.out.println("The file " + segment + " doesn't exist
> !");
> ->    }
> 
>     this.fieldInfos = fieldInfos;
>   }
>   
> So my question: what happens when a segment doesn't exist!? I think
> that
> the exception is due to this because tvx may be null in this case!
> 
> Thanks
> Samir
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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