April 27, 2020
Estimated Post Reading Time ~

How to Clear/Recompile the JSP classes in AEM 6.1

Sometime when we are deploying the packages, the JSP classes will not get compiled automatically in Adobe Experience Manager(AEM) 6.

We can follow the below option to clear/recompile the JSP classes.

Login to - http://localhost:4502/system/console/slingjsp

Click on Recompile all JSPs



Note:
We had Some UI issues need a recompilation of the JSPs in order to be resolved (/system/console/slingjsp). However, in AEM 6.5 (tested on an OOTB installation with no additional packages installed) the console with which this is usually done is no longer available. It is not present in the menu, nor is the URL accessible directly.

AEM 6.3:



AEM 6.5:





Solution:
That option was removed in 6.5. Now, Classes and Slightly cache is stored in the file system.

Apache Sling Commons FileSystem ClassLoader. Checkpoint 2 at [1] on how to clear classes and sightly cache

How to Recompile JSP files in AEM

Sometime the JSP classes will not get compiled automatically in Adobe Experience Manager(AEM). Strange UI issues can occur and compilation errors may be seen in the logs. In AEM6.4 libraries are no longer under /var/clientlibs folder, they are in the file system.

1. Recompile via AEM Web Console:
For classes and Slightly access [1] and click Recompile all JSPs.
For clientlibs access [2], click Invalidate Caches then click Rebuild Libraries.

2. Recompile via the file system
a) For classes and Slightly cache:
Search in the AEM instance home folder with command below:

find launchpad/felix -path "*/bundle*/data/classes" -type d

Delete the "classes" folder

Note: Classes and Slightly cache is stored in the Apache Sling Commons FileSystem ClassLoader bundle. You can also check the bundle number in the AEM Web Console and access that folder directly on the file system.

b) For clientlibs
Search in the AEM instance home folder with command below:

find launchpad/felix -path "*/bundle*/data/outputcache" -type d
Delete "outputcache" folder

Note: Clientlibs is now stored in the Adobe Granite UI Clientlibs. You can also check the bundle number in the AEM Web Console and access that folder directly on the file system.

[1] http://[host]:[port]/system/console/slingjsp
[2] http://[host]:[port]/libs/granite/ui/content/dumplibs.rebuild.html



By aem4beginner

No comments:

Post a Comment

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