this should definitively not happen, though I was not able to reproduce it on my jackrabbit checkout.

I have a vague idea what may cause the exception, but I'm not sure if the change I have committed solves the issue. svn revision is: 290665

could you please check the logs for error messages that say something like: "Exception while sorting nodes in document order: ..."

I'm particularly interested in the catched exception there.

thanks.

regards
 marcel

Raphaël Franchet wrote:
Thank you Marcel,

In fact, I was just testing jcr:like with jcr:primaryType but I don't need it on NAME properties.

Therefore, I think I found a bug: tell me if I should open it

queryManager.createQuery("//*[jcr:like(@jcr:primaryType, '%')]", Query.XPATH);

gives me:

Caused by: java.lang.NullPointerException
at org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl.initOrderedIterator(DocOrderNodeIteratorImpl.java:170) at org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl.hasNext(DocOrderNodeIteratorImpl.java:135)

--
regards,

Raphaël

Marcel Reutegger a écrit :

Hi Raphaël,

the jcr:like function is acutally not meant to be used with NAME
properties because it is not required by the spec (see section 6.6.3.3).
your second statement example works because the index structure is able
to handle this specific jcr:like expression, but it does not support it
in general as you have noticed with the last two statements.

please post a jira enhancement request if you feel this is a feature
that should be included in jackrabbit.

regards
 marcel

Raphaël Franchet wrote:

Hello,

I have got a strange behavior with the jcr:like function:

createQuery("//[EMAIL PROTECTED]:primaryType='myns:contentLanguage']"... OK
createQuery("//*[jcr:like(@jcr:primaryType, '%:contentLanguage')]"... OK

but as soon as I use namespaces in jcr:like,

createQuery("//*[jcr:like(@jcr:primaryType, '%ns:contentLanguage')]"... KO createQuery("//*[jcr:like(@jcr:primaryType, 'myns:contentLanguage')]"... KO

is this a known limitation between jcr:like and namespaces ?

Thanks

ps: I'm using the HEAD version





Reply via email to