That's weird. The line that throws the NPE seems like it ... well, cannot throw an NPE :).
LuceneTaxonomyWriter, line 724: return getParentArray().getArray()[ordinal]; getParentArray() never returns null, so it cannot be from there. ParentArray.getArray() cannot return null, as its internal array is initialized by LuceneTaxonomyWriter.getParentArray() (see lines 712-713), so that's really odd. But perhaps we're looking in the wrong place. Can you please describe what are the steps that you perform, and how is using ThreadedIndexWriter related? Shai On Thu, Sep 29, 2011 at 7:22 PM, Mihai Caraman <caraman.mi...@gmail.com>wrote: > Hmm.. if i leave it a couple of minutes before restarting, it doesn't log > the proper shutdown steps, but it does restart correctly. > > 2011/9/29 Mihai Caraman <caraman.mi...@gmail.com> > > > There may be some likage while using threadedIndexWriter... > > > > The app start as a listener servlet in tomcat6 > > First start, all ok. > > First close, none of these lines appear: > > *INFO: A valid shutdown command was received via the shutdown port. > > Stopping the Server instance. > > Sep 29, 2011 3:28:34 PM org.apache.coyote.AbstractProtocol pause > > INFO: Pausing ProtocolHandler ["http-bio-80"] > > Sep 29, 2011 3:28:35 PM org.apache.coyote.AbstractProtocol pause > > INFO: Pausing ProtocolHandler ["ajp-bio-8009"] > > Sep 29, 2011 3:28:36 PM org.apache.catalina.core.StandardService > > stopInternal > > INFO: Stopping service Catalina > > > > **Sep 29, 2011 3:28:45 PM org.apache.coyote.AbstractProtocol stop > > INFO: Stopping ProtocolHandler ["http-bio-80"] > > Sep 29, 2011 3:28:45 PM org.apache.coyote.AbstractProtocol stop > > INFO: Stopping ProtocolHandler ["ajp-bio-8009"] > > Sep 29, 2011 3:28:45 PM org.apache.coyote.AbstractProtocol destroy > > INFO: Destroying ProtocolHandler ["http-bio-80"] > > Sep 29, 2011 3:28:45 PM org.apache.coyote.AbstractProtocol destroy > > INFO: Destroying ProtocolHandler ["ajp-bio-8009"]* > > > > Second start: > > Exception in thread "pool-1-thread-3" java.lang.NullPointerException > > at > > > org.apache.lucene.facet.taxonomy.lucene.LuceneTaxonomyWriter.getParent(LuceneTaxonomyWriter.java:724) > > at > > > org.apache.lucene.facet.index.streaming.CategoryParentsStream.incrementToken(CategoryParentsStream.java:106) > > at > > > org.apache.lucene.facet.index.streaming.CountingListTokenizer.incrementToken(CountingListTokenizer.java:63) > > at > > > org.apache.lucene.facet.index.streaming.CategoryTokenizer.incrementToken(CategoryTokenizer.java:48) > > at > > > org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:185) > > at > > > org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:278) > > at > > > org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:766) > > at > > org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2067) > > at > > > org.myapp.search.CustomLucene.ThreadedIndexWriter.access$1(ThreadedIndexWriter.java:1) > > at > > > org.myapp.search.CustomLucene.ThreadedIndexWriter$Job.run(ThreadedIndexWriter.java:39) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > at java.lang.Thread.run(Thread.java:662) > > > > > > >