lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Re: ClassCastException/DocumentWriter and NullPointerException/RAMInputStream
Date Tue, 27 Feb 2007 02:57:41 GMT
Looks like this was caused by a corrupt Java installation.  I was half expecting 
to see a comment in the code that said

// Impossible event occurred

Antony


Antony Bowesman wrote:
> When adding documents to an index has anyone seen either
> 
> java.lang.ClassCastException: org.apache.lucene.analysis.Token cannot be 
> cast to org.apache.lucene.index.Posting
>   at 
> org.apache.lucene.index.DocumentWriter.sortPostingTable(DocumentWriter.java:238) 
> 
>   at 
> org.apache.lucene.index.DocumentWriter.addDocument(DocumentWriter.java:96)
>   at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:476)
> 
> or
> 
> java.lang.NullPointerException
>   at org.apache.lucene.store.RAMInputStream.<init>(RAMInputStream.java:32)
>   at org.apache.lucene.store.RAMDirectory.openInput(RAMDirectory.java:171)
>   at 
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:155)
>   at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:129)
>   at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:110)
>   at 
> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:702)
>   at 
> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:686)
>   at 
> org.apache.lucene.index.IndexWriter.flushRamSegments(IndexWriter.java:656)
>   at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:402)
> 
> This data has been indexed many times, but I've never seen this before.  
> It's Java 6 and Lucene 2.0.
> 
> Thanks
> Antony
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 


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


Mime
View raw message