From java-dev-return-48090-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Fri Mar 19 14:01:52 2010 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 59047 invoked from network); 19 Mar 2010 14:01:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Mar 2010 14:01:52 -0000 Received: (qmail 57780 invoked by uid 500); 19 Mar 2010 14:01:51 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 57708 invoked by uid 500); 19 Mar 2010 14:01:51 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 57701 invoked by uid 99); 19 Mar 2010 14:01:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 14:01:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 14:01:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9A695234C4AF for ; Fri, 19 Mar 2010 14:01:27 +0000 (UTC) Message-ID: <891010773.364261269007287631.JavaMail.jira@brutus.apache.org> Date: Fri, 19 Mar 2010 14:01:27 +0000 (UTC) From: "Ritesh Nigam (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2280) IndexWriter.optimize() throws NullPointerException In-Reply-To: <357375611.455861266908728226.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847376#action_12847376 ] Ritesh Nigam commented on LUCENE-2280: -------------------------------------- I will further investigate it if it is a JRE bug, There are few points which i need some advise 1. To fix this issue if i disable the optimize (remove the call to IndexWriter.optimize() from my code) will that create any problem in the long run? if yes what kind of problems it may create? 2. Just by knowing the scenario, that after a NullPointerException, index file gets deleted, can you provide me a patch where any kind of exception is handled by the Lucene API and my index remains untouched? > 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, lucene.zip > > > 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