« Return to Thread: [jira] Created: (JCR-1573) Lucene Query Exception: 'attempt to access a deleted document'

[jira] Commented: (JCR-1573) Lucene Query Exception: 'attempt to access a deleted document'

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/jira/browse/JCR-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610601#action_12610601 ]

David McKitterick commented on JCR-1573:
----------------------------------------

Hi Marcel,

Yes, I converted back to Lucene 2.2.0 and used the default Jackrabbit configurations. The problem still remained so I did some more testing. I discovered that the problem was occurring during my update process... here I would remove a particular node and then replace it with the updated version by importing the XML. It seems the lucene index did not pick up this remove/import action and then when a query was performed it would try to retrieve the removed node... therefore throwing the exception. I resolved this by adding my this extra line after my update process:

node.update(session.getWorkspace().getName());

This seemed to update the index and the exception has not re-occurred.

I'm guessing there probably is a better way to perform updates but it was not obvious to me from the documentation available.

Anyway, thanks for your help.

Best regards,
David.


> Lucene Query Exception: 'attempt to access a deleted document'
> --------------------------------------------------------------
>
>                 Key: JCR-1573
>                 URL: https://issues.apache.org/jira/browse/JCR-1573
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: query
>    Affects Versions: core 1.4.2
>         Environment: Windows XP, PostgreSQL database, Spring, Tomcat
>            Reporter: David McKitterick
>         Attachments: jackrabbit-repo.xml
>
>
> Hi,
> I am getting an exception when trying to execute a query through the (Spring) JcrTemplate class....using the following code:
> QueryManager qMgr = session.getWorkspace().getQueryManager();
> QueryResult result = qMgr.createQuery(xpathQuery, Query.XPATH ).execute();
> The exception is thrown at the second line and is as follows:
> [DEBUG] << "[0x9]at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:113)[\n]"
> [DEBUG] << "[0x9]at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:74)[\n]"
> [DEBUG] << "[0x9]at org.apache.lucene.search.Hits.<init>(Hits.java:53)[\n]"
> [DEBUG] << "[0x9]at org.apache.lucene.search.Searcher.search(Searcher.java:46)[\n]"
> [DEBUG] << "[0x9]at org.apache.lucene.search.Searcher.search(Searcher.java:38)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:660)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.executeQuery(QueryResultImpl.java:242)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(QueryResultImpl.java:290)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.<init>(QueryResultImpl.java:192)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:138)[\n]"
> [DEBUG] << "[0x9]at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:176)[\n]"
> [DEBUG] << "[0x9]at com.intel.cds.cr.jcr.JcrManager$5.doInJcr(JcrManager.java:363)[\n]"
> [DEBUG] << "[0x9]at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:76)[\n]"
> [DEBUG] << "[0x9]at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)[\n]"
> [DEBUG] << "[0x9]... 19 more[\n]"
> [DEBUG] << "</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
> org.apache.axis2.AxisFault: attempt to access a deleted document
> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
> at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> My Jackrabbit/Lucene configuration is as follows:
> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>         <param name="path" value="${rep.home}/repository/index"/>
>        
>         <param name="useCompoundFile" value="false"/>
>         <param name="mergeFactor" value="5"/>
>         <param name="cacheSize" value="10000"/>
>         <param name="respectDocumentOrder" value="false"/>  
>   </SearchIndex>
> Is this a configuration issue or a bug?
> Thanks,
> David.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Created: (JCR-1573) Lucene Query Exception: 'attempt to access a deleted document'

LightInTheBox - Buy quality products at wholesale price