Why the following query
type=cq:Page
1_group.1_path=/content/we-retail/it
1_group.2_path=/content/we-retail/fr
1_group.3_path=/content/we-retail/us
1_group.p.or=true
orderby=@jcr:lastModified
orderby.sort=desc
produce this error:
Could not run xpath query
javax.jcr.query.InvalidQueryException: java.text.ParseException: (/jcr:root/content/we-retail/it//element(*, cq:Page) | /jcr:root/content/we-retail/fr//element(*, cq:Page) | /jcr:root/content/we-retail/us//element(*, cq:Page)) order by @jcr:lastModified descending converted to SQL-2 Query: select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/it') /* xpath: /jcr:root/content/we-retail/it//element(*, cq:Page) order by @jcr:lastModified descending */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/fr') /* xpath: /jcr:root/content/we-retail/fr//element(*, cq:Page) order by @jcr:lastModified descending */ order by [jcr:lastModified] desc union(*)select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/us') /* xpath: /jcr:root/content/we-retail/us//element(*, cq:Page) order by @jcr:lastModified descending */ order by [jcr:lastModified] desc; expected: <end>
NB: if I remove a path the query is successfully executed. If I remove the orderBy and leave the three paths the query is successfully executed, but naturally the results are not ordered.
Please help me.
Thanks
Solved! Go to Solution.
The problem was resolved by installing hotfix aem-6.3.0-cfp-1.0.zip
thank you
Views
Replies
Total Likes
How are you executing this Query - from CRXDE or from Java code?
Views
Replies
Total Likes
I tested it on the querydebugger.
Views
Replies
Total Likes
I just copied your query and ran it on Query Builder Debugger. I was able to see results (129 hits..)
Using AEM 6.2 SP1
I also have the same problem in aem 6.3. In aem 6.2 works correctly. I tested it in querydebugger and in java code.
Views
Replies
Total Likes
I use the 6.3.
I checked on 6.2 is working.
This is absurd
Views
Replies
Total Likes
The problem was resolved by installing hotfix aem-6.3.0-cfp-1.0.zip
thank you
Views
Replies
Total Likes
Thanks for posting the fix! This will be helpful to future inquires on this issue.
Views
Replies
Total Likes