CRX SQL2 Query works in AEM 6.1 but not in 6.4 | Community
Skip to main content
Level 2
December 26, 2018
Solved

CRX SQL2 Query works in AEM 6.1 but not in 6.4

  • December 26, 2018
  • 11 replies
  • 7883 views

Hello everyone,

We are currently migrating our applications from AEM 6.1 to AEM 6.4. One of these applications makes use of SQL2 to access certain nodes.

While these queries give expected results in AEM 6.1, the same query gives 0 results in the 6.4 environment.

The content nodes are the same as we built the content package from the already working 6.1 environment and installed it in the local 6.4 environment.

e.g:

SELECT * FROM [nt:unstructured] As node WHERE ISDESCENDANTNODE (node, '/content/surveymanagement/site-confirmation-author') and node.[sling:resourceType]= 'wcm/foundation/components/parsys'

The above query returns the expected node in 6.1 but gives no nodes in 6.4

When I remove the "node.[sling:resourceType]" condition, it atleast lists out the relevant nodes. So it seems there is something off with the sling:resouceType condition. Is there anything that has changed in the querying syntax? I am unable to get any information on this elsewhere.

Also, when I replaced the sling:resourceType condition with a NAME() condition, the query works. There are other queries that are giving similar issues, so I would much rather get the old queries to work than to look for workarounds.

I hope someone can help me with this. Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi,

I tried with your content structure, working for me in my local instance.

I think you can raise a Day care Support Ticket to get it resolved.

11 replies

Ankur_Khare
Community Advisor
Community Advisor
October 10, 2019

Make sure the system user have relevant permissions..

Without proper permission, this will not work from java.