lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Call <>
Subject AlreadyClosedException on new index
Date Mon, 05 Jan 2015 23:32:17 GMT
Hi Guys,

So I’m seeing a problem in production that is very bizarre and I wanted to see if anyone
else has encountered this issue and/or has a suggestion or fix. Here goes:

We create a wrapper around an index and searcher manager to encapsulate both. First we create
the IndexWriter and then immediately after create the SearcherManager, like this:

indexWriter = new IndexWriter(indexDirectory, getWriterConfig());
searcherManager = new SearcherManager(indexWriter, true, new ExecutorSearcherFactory());

During construction of the SearcherManager this is thrown:

Caused by: this IndexWriter is closed
        at org.apache.lucene.index.IndexWriter.ensureOpen(
        at org.apache.lucene.index.IndexWriter.getDirectory(
        at java.util.concurrent.ArrayBlockingQueue.contains(
        at org.apache.lucene.index.IndexWriter.maybeMerge(
        at org.apache.lucene.index.IndexWriter.maybeMerge(
        at org.apache.lucene.index.IndexWriter.getReader(
        at org.apache.lucene.index.IndexWriter.getReader(
        at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(
        ... 57 more

Why? No other threads are acting on this index, etc. The index writer was just created so
how could it already be closed? 

I’m completely baffled on this one guys… so many thanks in advance for your help! I’ll
take any suggestions on a possible mitigation too if anyone thinks of any. 

Brian Call 
Manager, Systems Software Development	
Work: +1 (619) 373-4840 | Cell: +1 (619) 344-1013

 <> 			Sotera Wireless, Inc.
10020 Huennekens Street San Diego, CA 92121, USA
Phone: +1 (858) 427-4620 | Fax: +1 (858) 999-2487

PRIVILEGED AND CONFIDENTIAL COMMUNICATION: This electronic transmission, and any documents
attached hereto, may contain confidential and/or legally privileged information. The information
is intended only for use by the recipient named above. If you have received this electronic
message in error, please notify the sender and delete the electronic message. Any disclosure,
copying, distribution, or use of the contents of information received in error is strictly

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message