September 19, 2020
Estimated Post Reading Time ~

How to clear script cache in AEM

At some point you may face the issue where your AEM page is not getting loaded and following errors getting printed in error log file.

Errors:
*ERROR* [182.75.136.107 [1589236795135] GET /content/jorvee/tools/en_us/gen-tool-10-10.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/content/jorvee/tools/en_us/gen-tool-10-10/jcr:content', selectorString='null', extension='html', suffix='null'org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 60000/60000 ms

OR 

*ERROR* [0:0:0:0:0:0:0:1 [1531894023650] GET /content/we-retail/us/en/user/smartlist.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/content/jorvee/tools/en_us/gen-tool-10-10/jcr:content', selectorString='null', extension='html', suffix='null'
org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Identifier com.adobe.cq.wcm.core.components.models.Page cannot be correctly instantiated by the Use API

Resolution:
To solve this issue we need to clear the cached HTML and JS files from AEM.
Solution 1:
Browse the "Adobe Experience Manager Web Console Script Cache Status" http://localhost:4502/system/console/scriptcache
at the bottom of the page there is a "Clear Cache" button, click on the button to clear all the above listed cached scripts. You may also clear one by one if you doesn't want to clear all of them. To remove the individual script click on the remove button next to that script in right. 
Adobe Experience Manager Web Console Script Cache Status

Solution 2:
Restart your AEM environment.

Source: https://rashidjorvee.blogspot.com/2020/05/clear-script-cache-in-aem.html 



By aem4beginner

2 comments:

  1. org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Identifier com.adobe.cq.wcm.core.components.models.Page cannot be correctly instantiated by the Use API
    Im getting the same error but still cannot resolve after clearing the cache
    What to do

    ReplyDelete
  2. Resolution is fine. Any idea why this issue occurring?

    ReplyDelete

If you have any doubts or questions, please let us know.