You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Alvaro Gonzalez <ag...@germinus.com> on 2005/11/15 16:55:39 UTC
Error using function deref
Hi everybody.
I have a problem when I search a repository using the "deref" function.
When I search with this query:
/ "/jcr:root/path/referencer/jcr:deref(@aReference,'*')"
/ it works good, it returns the node referenced. But if I try to search
with a query of this type:
/ "//referencer/jcr:deref(@aReference)"
/ the application throws a NullPointer (trace included below).
¿Is this a bug or is not possible to use "//" in a query path when using
deref functions?
We are using SimpleDbPersistenceManager with postgresql.
Regards,
Alvaro
java.lang.NullPointerException
at
org.apache.jackrabbit.core.query.lucene.DerefQuery$DerefScorer.calculateChildren(DerefQuery.java:281)
at
org.apache.jackrabbit.core.query.lucene.DerefQuery$DerefScorer.next(DerefQuery.java:221)
at org.apache.lucene.search.Scorer.score(Scorer.java:37)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:92)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
at org.apache.lucene.search.Hits.<init>(Hits.java:43)
at org.apache.lucene.search.Searcher.search(Searcher.java:33)
at org.apache.lucene.search.Searcher.search(Searcher.java:27)
at
org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:337)
at
org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:174)
at
org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:132)
--
Alvaro Gonzalez de Paz
Germinus XXI
http://www.germinus.com
Avda. de Manoteras, 44. 2ª planta.
28050 - Madrid (Spain)
Tel (+34) 91 296 12 34
Fax (+34) 91 296 12 30
Re: Error using function deref
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Alvaro,
did you recently update jackrabbit to a newer version and are still
using index data created by an older version?
the exception indicates that there is a node in the index that does not
have a single property, which is basically impossible. unless the index
was created with a (quite) old jackrabbit version.
Do you see the same exception, when you recreate the index and than run
the query again?
I was not able to reproduce the exception, though I'm not using
extensive test data in my workspace. If you are able to reproduce the
exception with well defined data you added to a workspace that would be
a great help.
regards
marcel
Alvaro Gonzalez wrote:
> Hi everybody.
> I have a problem when I search a repository using the "deref" function.
> When I search with this query:
>
> / "/jcr:root/path/referencer/jcr:deref(@aReference,'*')"
>
> / it works good, it returns the node referenced. But if I try to search
> with a query of this type:
>
> / "//referencer/jcr:deref(@aReference)"
>
> / the application throws a NullPointer (trace included below).
>
> ¿Is this a bug or is not possible to use "//" in a query path when using
> deref functions?
>
> We are using SimpleDbPersistenceManager with postgresql.
>
> Regards,
> Alvaro
>
>