Expand my Community achievements bar.

SOLVED

ACS Commons Explain Query Tool, Help needed..403 Error when trying to execute the query

Avatar

Level 4
Hello Team,

For some reason my previous question was not displaying in the forum correctly when I open the question. please apolgoize, I have to repost the question.

I downloaded the ACS commons tools package and installed in the CQ instance I am getting the issue below when trying to run the query. I have attached the screenshot for your reference.

I ran the xpath query /jcr:root/home/users//element(*,rep:Token). I have tried some other queries also but the same issue.

  1. Request URL:
  2. Request Method:
    POST
  3. Status Code:
     
    403 Forbidden
Can you please assist what additional steps I need to perform to get this queries running.

--CQ Voyager

1 Accepted Solution

Avatar

Correct answer by
Level 2

Can you try logging in as admin and see if the problem resolves (assuming this is on a lower level env, which it should be since you installed ACS Tools)

403 indicates you may have some login or permissing problems.

Thanks

View solution in original post

3 Replies

Avatar

Level 10

Can you please post the URL to the docs for this tool. It should be on the main page. 

Avatar

Correct answer by
Level 2

Can you try logging in as admin and see if the problem resolves (assuming this is on a lower level env, which it should be since you installed ACS Tools)

403 indicates you may have some login or permissing problems.

Thanks

Avatar

Level 4

David,

Thanks for your response. This is in the local AEM authoring instance and the URL http://localhost:4502/etc/acs-tools/explain-query.html. I'm logged in as administrator and I'm navigating from Tools->ACS AEM Tools->Explain Query.

When I initially load this http://localhost:4502/etc/acs-tools/explain-query.html, it executes some default query and it returns the response and show the results with Http status as 200. when I highlight one of the results and click on it and then try to run the Explain Query, I am seeing the 403 Error.

Initially loading the page.. with Http 200 status

  1. Request URL:
  2. Request Method:
    GET
  3. Status Code:
     
    200 OK

{"slowQueries":[{"duration":3427,"language":"JCR-SQL2","occurrenceCount":1,"statement":"select * from [nt:unstructured] AS [projects] where ([projects].[sling:resourceType] = 'cq/gui/components/projects/admin/card/projectcontent') AND (ISDESCENDANTNODE([projects], [/content/projects]))"},{"duration":3416,"language":"xpath","occurrenceCount":12,"statement":"/jcr:root/home/users//element(*,rep:Token)"},{"duration":1840,"language":"xpath","occurrenceCount":11,"statement":"/jcr:root/home/users//element(*,rep:Token)"},{"duration":554,"language":"sql","occurrenceCount":12,"statement":"SELECT * FROM nt:base WHERE sling:resourceType = 'cq/reporting/components/reportpage' AND jcr:path like '/etc/reports/%'"},{"duration":552,"language":"sql","occurrenceCount":11,"statement":"SELECT * FROM nt:base WHERE sling:resourceType = 'cq/reporting/components/reportpage' AND jcr:path like '/etc/reports/%'"},{"duration":367,"language":"JCR-SQL2","occurrenceCount":1,"statement":"SELECT * FROM [sling:chunks] "},{"duration":145,"language":"sql","occurrenceCount":1,"statement":"SELECT sling:vanityPath, sling:redirect, sling:redirectStatus FROM sling:VanityPath WHERE sling:vanityPath IS NOT NULL"},{"duration":55,"language":"sql","occurrenceCount":5,"statement":"SELECT * FROM nt:base WHERE sling:resourceType = 'cq/reporting/components/reportpage' AND jcr:path like '/etc/reports/%'"},{"duration":47,"language":"xpath","occurrenceCount":1,"statement":"/jcr:root/content/dam//element(*, dam:Asset)[(@jcr:created > xs:dateTime('1970-01-01T00:00:01.291Z') and @jcr:created < xs:dateTime('2016-05-04T05:31:00.291Z'))]"},{"duration":46,"language":"sql","occurrenceCount":6,"statement":"SELECT * FROM nt:base WHERE sling:resourceType = 'cq/reporting/components/reportpage' AND jcr:path like '/etc/reports/%'"},{"duration":41,"language":"xpath","occurrenceCount":1,"statement":"//element(*,slingevent:TimedEvent)[@slingevent:created < xs:dateTime('2016-05-03T12:45:32.334-05:00')] order by @slingevent:created ascending"},{"duration":33,"language":"xpath","occurrenceCount":1,"statement":"//element(*,nt:file)[jcr:contains(., '.jar')]"},{"duration":28,"language":"xpath","occurrenceCount":1,"statement":"/jcr:root/content/dam//element(*, dam:Asset)[(jcr:content/metadata/@prism:expirationDate > xs:dateTime('2016-05-03T05:00:00.000Z') and jcr:content/metadata/@prism:expirationDate < xs:dateTime('2016-05-04T05:30:59.076Z'))]"},{"duration":23,"language":"xpath","occurrenceCount":1,"statement":"//element(*,cq:PollConfig)"},{"duration":21,"language":"xpath","occurrenceCount":5,"statement":"/jcr:root/home/users//element(*,rep:Token)"}],"popularQueries":[{"duration":0,"language":"sql","occurrenceCount":22,"statement":"SELECT * FROM nt:base WHERE sling:resourceType = 'cq/reporting/components/reportpage' AND jcr:path like '/etc/reports/%'"},{"duration":1,"language":"xpath","occurrenceCount":21,"statement":"/jcr:root/home/users//element(*,rep:Token)"},{"duration":0,"language":"JCR-SQL2","occurrenceCount":10,"statement":"SELECT * FROM [granite:InboxItem] AS s where assignee IS NOT NULL and status='ACTIVE' ORDER BY s.startTime DESC"},{"duration":1,"language":"JCR-SQL2","occurrenceCount":10,"statement":"select * from [nt:unstructured] AS [projects] where (([projects].[sling:resourceType] = 'cq/gui/components/projects/admin/card/projectcontent') AND (ISDESCENDANTNODE([projects], [/content/projects]))) AND ([projects].[active] = CAST('true' AS BOOLEAN))"},{"duration":0,"language":"xpath","occurrenceCount":7,"statement":"//element(*,nt:file)[jcr:contains(., '.jar')]"},{"duration":1,"language":"sql","occurrenceCount":3,"statement":"SELECT * FROM cq:Console WHERE  jcr:path LIKE '/apps/%' ORDER BY sling:vanityOrder DESC"},{"duration":0,"language":"sql","occurrenceCount":3,"statement":"SELECT * FROM cq:Console WHERE  jcr:path LIKE '/libs/%' ORDER BY sling:vanityOrder DESC"},{"duration":0,"language":"sql","occurrenceCount":3,"statement":"SELECT * FROM cq:Console WHERE  jcr:path LIKE '/libs/foundation/components/primary/%' ORDER BY sling:vanityOrder DESC"},{"duration":0,"language":"sql","occurrenceCount":3,"statement":"SELECT * FROM cq:Console WHERE  jcr:path LIKE '/apps/foundation/components/primary/%' ORDER BY sling:vanityOrder DESC"},{"duration":0,"language":"xpath","occurrenceCount":2,"statement":"/jcr:root//*[jcr:content/@cq:keywords]"},{"duration":0,"language":"JCR-SQL2","occurrenceCount":2,"statement":"SELECT * FROM [sling:chunks] "},{"duration":1,"language":"xpath","occurrenceCount":2,"statement":"/jcr:root/var/statistics/results//_x002e_stats"},{"duration":2,"language":"sql","occurrenceCount":1,"statement":"SELECT sling:alias FROM nt:base WHERE sling:alias IS NOT NULL"},{"duration":145,"language":"sql","occurrenceCount":1,"statement":"SELECT sling:vanityPath, sling:redirect, sling:redirectStatus FROM sling:VanityPath WHERE sling:vanityPath IS NOT NULL"},{"duration":41,"language":"xpath","occurrenceCount":1,"statement":"//element(*,slingevent:TimedEvent)[@slingevent:created < xs:dateTime('2016-05-03T12:45:32.334-05:00')] order by @slingevent:created ascending"}]}