aspose file tools*
The moose likes JForum and the fly likes Lucene Already Closed Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Lucene Already Closed Exception" Watch "Lucene Already Closed Exception" New topic
Author

Lucene Already Closed Exception

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I am stress testing Jforum 2.1.8 and running a load script using Empirix Eload stress tester that includes a forum search as one of its steps. After about 150 users have logged in the following exception is thrown

Caused by: net.jforum.exceptions.SearchException: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:128)
at org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:217)
at org.apache.lucene.search.IndexSearcher.docFreq(IndexSearcher.java:87)
at org.apache.lucene.search.Similarity.idf(Similarity.java:459)
at org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:44)
at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:145)
at org.apache.lucene.search.BooleanQuery$BooleanWeight.<init>(BooleanQuery.java:187)
at org.apache.lucene.search.BooleanQuery.createWeight(BooleanQuery.java:353)
at org.apache.lucene.search.Query.weight(Query.java:95)
at org.apache.lucene.search.Hits.<init>(Hits.java:57)
at org.apache.lucene.search.Searcher.search(Searcher.java:55)
at net.jforum.search.LuceneSearch.performSearch(Unknown Source)
at net.jforum.search.LuceneSearch.search(Unknown Source)
at net.jforum.search.LuceneManager.search(Unknown Source)
at net.jforum.search.SearchFacade.search(Unknown Source)
at net.jforum.search.ContentSearchOperation.performSearch(Unknown Source)
at net.jforum.view.forum.SearchAction.search(Unknown Source)
at net.jforum.view.forum.SearchAction.search(Unknown Source)
... 16 more

Has anybody seen a similar problem?

There are discussions around this problem in other implementations of Lucene but nothing in Jforum discussions that I can find.

Nick
[originally posted on jforum.net by nickp]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Are you using the Lucene 2.2.0 jar that came with the distribution or are you using a 2.3 version? Did a quick google for lucene indexreader alreadyclosedexception and saw references to a bug in 2.3 that can cause this...


[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The 2.2.0 jar delivered with forum 2.1.8
[originally posted on jforum.net by nickp]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Not sure what to tell you.. the Lucene code is new with 2.1.8 and I haven't really messed with it enough to know what might be going on. Raphael may have some suggestions.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok Thanks. I'll keep an eye open for developments!

Nick
[originally posted on jforum.net by nickp]
 
 
subject: Lucene Already Closed Exception
 
Similar Threads
file reading in applet
Getting the contents from the URL
java.net.SocketException: Connection closed by remote host
Applet File Permission !!
Set my Java application as the default program to open a file extension