lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritesh Nigam (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2280) IndexWriter.optimize() throws NullPointerException
Date Wed, 03 Mar 2010 13:56:28 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840660#action_12840660
] 

Ritesh Nigam commented on LUCENE-2280:
--------------------------------------

Sorry for the delayed response but i was trying to collect some data, I still have to wait
for the log created by lucene APIs after turning on infostream, i will post that log file
as soon as i get it. To answer your questions, i am running on Windows 2003 server with IBM
JRE 1.6 and I am trying to index a database that is about 45 GB in size. On Unix, i am not
facing this issue.

With the lucene logging on, i waited for about 2 days for the NPE to reoccur, but it did not
happen. I was tyring with the stock jar file of lucene 2.3.2. However, indexing failed again
and the index file was again deleted. Looking into the logs this time, I found the following
exceptions:

16:06:48 03/01/2010: Fatal error while indexing CRs.
Stack trace: java.io.FileNotFoundException: index\_21f.fdt (The system cannot find the file
specified.)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:218)
	at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDirectory.java:506)
	at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:536)
	at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
	at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:440)
	at org.apache.lucene.index.CompoundFileWriter.copyFile(CompoundFileWriter.java:206)
	at org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:173)
	at org.apache.lucene.index.DocumentsWriter.createCompoundFile(DocumentsWriter.java:576)
	at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:2708)
	at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:2539)
	at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1222)
	at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1196)
	at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1164)

I am not sure if deletion of the index file when these exceptions are thrown, is the right
behaviour. 

I am re-running my test to try and reproduce the NPE issue which i had reported earlier and
i intend to pass on the logs to you as soon as i have it. However, are you aware of any issue
that a combination of IBM JRE + Windows 2003 server would have with lucene?

As far as the code is concern I am closing the indexwriter in finally block, when is thrown
I am logging it in catch block and then finally closing the indexwriter.

		

> IndexWriter.optimize() throws NullPointerException
> --------------------------------------------------
>
>                 Key: LUCENE-2280
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2280
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.2
>         Environment: Win 2003, lucene version 2.3.2, IBM JRE 1.6
>            Reporter: Ritesh Nigam
>         Attachments: lucene.jar
>
>
> I am using lucene 2.3.2 search APIs for my application, i am indexing 45GB database which
creates approax 200MB index file, after finishing the indexing and while running optimize()
i can see NullPointerExcception thrown in my log and index file is getting corrupted, log
says
> ------------------------------------------------------------------------
> Caused by: 
> java.lang.NullPointerException
> 	at org.apache.lucene.store.BufferedIndexOutput.writeBytes(BufferedIndexOutput.java:49)
> 	at org.apache.lucene.store.IndexOutput.writeBytes(IndexOutput.java:40)
> 	at org.apache.lucene.index.SegmentMerger.mergeNorms(SegmentMerger.java:566)
> 	at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:135)
> 	at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3273)
> 	at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:2968)
> 	at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:240)
> ------------------------------------------------------------------------
> and this is happening quite frequently, although I am not able to reproduce it on demand,
I saw an issue logged which is some what related to mine issue (http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200809.mbox/%3C6E4A40DB-5EFC-42DA-A857-D59F4EC3496B@mikemccandless.com%3E)
but the only difference here is I am not using Store.Compress for my fields, i am using Store.NO
instead. please note that I am using IBM JRE for my application.
> Is this an issue with lucene?, if yes it is fixed in which version?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message