I was trying to build a lucene index (Lucene 2.0, JDK 5) with
approximately 150000 documents containing about 25 fields for each
document. After indexing about 45000 documents , the program crashed.
It was running as a batch job and did not log the cause of the crash.
In order to identify why the process crashed, I restarted the job
about 50 documents before the crash point so that I can identify the
problem. At this point, the program first tries to delete the document
if it's already present in the index and then adds it. As soon as I
start the program, the program aborts with a StackOverflowError while
calling indexreader.deleteDocuments(new Term()) method (even for the
document that was indexed earlier). Here is the partial stacktrace:
Exception in thread "main" java.lang.StackOverflowError
at java.lang.ref.Reference.(WeakReference.java:40)
at java.lang.ThreadLocal$ThreadLocalMap$Entry.(ThreadLocal.java:235)
at java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java:375)
at java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:225)
at java.lang.ThreadLocal.get(ThreadLocal.java:127)
at org.apache.lucene.index.TermInfosReader.getEnum(TermInfosReader.java:79)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:139)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:50)
at org.apache.lucene.index.MultiTermDocs.termDocs(MultiReader.java:392)
at org.apache.lucene.index.MultiTermDocs.next(MultiReader.java:348)
at org.apache.lucene.index.MultiTermDocs.next(MultiReader.java:349)
The last line [at
org.apache.lucene.index.MultiTermDocs.next(MultiReader.java:349)]
repeats another 1010 times before the program crashes.
I understand that without the actual index or the documents, it's
nearly impossible to narrow down the cause of the error. However, can
you please point to any theoretical reason why
org.apache.lucene.index.MultiTermDocs.next will go into an infinite
loop?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]