You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Raffaele Gambelli <Ra...@cegeka.com.INVALID> on 2024/06/21 09:20:11 UTC

[Oak] Exception using RowIterator while with NodeIterator works fine

Hi all,

could you explain me the difference between using a NodeIterator and a RowIterator?

My code used RowIterator since many years with jackrabbit 2.x and I've never had problems, now using oak the following query, when I do row.getNode() throws:
java.lang.IllegalArgumentException: More than one selector
at org.apache.jackrabbit.oak.query.ResultRowImpl.getTree(ResultRowImpl.java:87)
at org.apache.jackrabbit.oak.jcr.query.RowImpl.getNode(RowImpl.java:55)
at org.apache.jackrabbit.oak.jcr.query.RowImpl.getNode(RowImpl.java:50)

If I replace RowIterator with NodeIterator it works fine, why?

o.a.jackrabbit.oak.query.QueryImpl: query execute select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [author] as b on ischildnode(b, a) where name(a) = 'my-article' and isdescendantnode(a, '/') and b.[jcr:uuid] = '4f6a4e77-7f45-410f-9f93-318007c6712f' /* xpath: /jcr:root//my-article/element(*, author)[@jcr:uuid = '4f6a4e77-7f45-410f-9f93-318007c6712f'] */ (logDebug in QueryImpl.java, line 1321)

Thanks

Cordiali saluti / Best regards,

Raffaele Gambelli
Senior Java Developer
E  Raffaele.Gambelli@cegeka.com<ma...@cegeka.com>

[CEGEKA]        Via Ettore Cristoni, 84
IT-40033 Bologna (IT), Italy
T +39 02 2544271
WWW.CEGEKA.COM<https://www.cegeka.com>

[http://signature.cegeka.com/SignatureRO/bannerRO.jpg]