Lucene - Core
  1. Lucene - Core
  2. LUCENE-2280

IndexWriter.optimize() throws NullPointerException

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: core/index
    • Environment:

      Win 2003, lucene version 2.3.2, IBM JRE 1.6

    • Lucene Fields:
      New

      Description

      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?

      1. LuceneUtils.zip
        2.40 MB
        Ritesh Nigam
      2. lucene.zip
        3.75 MB
        Ritesh Nigam
      3. lucene.jar
        650 kB
        Ritesh Nigam

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Ritesh Nigam
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development