You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Fard <ma...@gmail.com> on 2009/03/19 03:30:05 UTC
this IndexReader is closed
Hi there,
I have created a simple application for adding some nodes with properties to
jackrabbit and then trying to search through the nodes and properties.
QueryManager queryManager = workspace.getQueryManager();
Query query = queryManager.createQuery ("//book01[@title = 'Book01']",
Query.XPATH);
QueryResult result = query.execute();
In repository one of my node is "Book01" and the title attribute of it is
"Book01".
I got the below error:
Exception in thread "main" org.apache.lucene.store.AlreadyClosedException:
this IndexReader is closed
at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:196)
at org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:310)
at org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:313)
at org.apache.lucene.search.IndexSearcher.docFreq(IndexSearcher.java:86)
at org.apache.lucene.search.Similarity.idf(Similarity.java:457)
at org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:44)
at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:146)
at org.apache.lucene.search.Query.weight(Query.java:95)
at
org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisWeight.scorer(DescendantSelfAxisQuery.java:193)
I appreciate for any help.
Maurice
--
View this message in context: http://www.nabble.com/this-IndexReader-is-closed-tp22592716p22592716.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: this IndexReader is closed
Posted by Fard <ma...@gmail.com>.
Thank you for response.
I used the last version of jackrabbit. The problem was solved.
Regards
Maurice
Alexander Klimetschek wrote:
>
> On Thu, Mar 19, 2009 at 3:12 PM, Fard <ma...@gmail.com> wrote:
>> I am using
>> jackrabbit-core-1.5-SNAPSHOT.jar
>
> Did you build from trunk? 1.5-SNAPSHOT could be anything after 1.4 and
> before the 1.5 release from the trunk, so it's impossible to know
> which features/bugs are included in that jar or not.
>
>> I don't use lucene in this project. Only I am using internal lucene in
>> jackrabbit for search. And I don't know which version of lucene comes
>> with
>> jackrabbit.
>
> In the same directory where the jackrabbit-core jar is located there
> should be a lucene-core-*.jar (and lucene-memory &
> lucene-spellchecker). That gives you the version.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
>
--
View this message in context: http://www.nabble.com/this-IndexReader-is-closed-tp22592716p22621309.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: this IndexReader is closed
Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Mar 19, 2009 at 3:12 PM, Fard <ma...@gmail.com> wrote:
> I am using
> jackrabbit-core-1.5-SNAPSHOT.jar
Did you build from trunk? 1.5-SNAPSHOT could be anything after 1.4 and
before the 1.5 release from the trunk, so it's impossible to know
which features/bugs are included in that jar or not.
> I don't use lucene in this project. Only I am using internal lucene in
> jackrabbit for search. And I don't know which version of lucene comes with
> jackrabbit.
In the same directory where the jackrabbit-core jar is located there
should be a lucene-core-*.jar (and lucene-memory &
lucene-spellchecker). That gives you the version.
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: this IndexReader is closed
Posted by Fard <ma...@gmail.com>.
Hi,
I am using
jackrabbit-core-1.5-SNAPSHOT.jar
I don't use lucene in this project. Only I am using internal lucene in
jackrabbit for search. And I don't know which version of lucene comes with
jackrabbit.
Regards
Maurice
Marcel Reutegger wrote:
>
> Hi,
>
> what version of jackrabbit and lucene are you using?
>
> regards
> marcel
>
> 2009/3/19 Fard <ma...@gmail.com>:
>>
>> Hi there,
>>
>> I have created a simple application for adding some nodes with properties
>> to
>> jackrabbit and then trying to search through the nodes and properties.
>>
>> QueryManager queryManager = workspace.getQueryManager();
>> Query query = queryManager.createQuery ("//book01[@title =
>> 'Book01']",
>> Query.XPATH);
>> QueryResult result = query.execute();
>> In repository one of my node is "Book01" and the title attribute of it is
>> "Book01".
>> I got the below error:
>>
>> Exception in thread "main"
>> org.apache.lucene.store.AlreadyClosedException:
>> this IndexReader is closed
>> at
>> org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:196)
>> at
>> org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:310)
>> at
>> org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:313)
>> at
>> org.apache.lucene.search.IndexSearcher.docFreq(IndexSearcher.java:86)
>> at org.apache.lucene.search.Similarity.idf(Similarity.java:457)
>> at
>> org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:44)
>> at
>> org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:146)
>> at org.apache.lucene.search.Query.weight(Query.java:95)
>> at
>> org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisWeight.scorer(DescendantSelfAxisQuery.java:193)
>>
>> I appreciate for any help.
>> Maurice
>> --
>> View this message in context:
>> http://www.nabble.com/this-IndexReader-is-closed-tp22592716p22592716.html
>> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/this-IndexReader-is-closed-tp22592716p22600983.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: this IndexReader is closed
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,
what version of jackrabbit and lucene are you using?
regards
marcel
2009/3/19 Fard <ma...@gmail.com>:
>
> Hi there,
>
> I have created a simple application for adding some nodes with properties to
> jackrabbit and then trying to search through the nodes and properties.
>
> QueryManager queryManager = workspace.getQueryManager();
> Query query = queryManager.createQuery ("//book01[@title = 'Book01']",
> Query.XPATH);
> QueryResult result = query.execute();
> In repository one of my node is "Book01" and the title attribute of it is
> "Book01".
> I got the below error:
>
> Exception in thread "main" org.apache.lucene.store.AlreadyClosedException:
> this IndexReader is closed
> at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:196)
> at org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:310)
> at org.apache.lucene.index.MultiReader.docFreq(MultiReader.java:313)
> at org.apache.lucene.search.IndexSearcher.docFreq(IndexSearcher.java:86)
> at org.apache.lucene.search.Similarity.idf(Similarity.java:457)
> at org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:44)
> at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:146)
> at org.apache.lucene.search.Query.weight(Query.java:95)
> at
> org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisWeight.scorer(DescendantSelfAxisQuery.java:193)
>
> I appreciate for any help.
> Maurice
> --
> View this message in context: http://www.nabble.com/this-IndexReader-is-closed-tp22592716p22592716.html
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>
>