New in Apache Sling: FSClassLoader ConsolePublished on by Dan Klco
In AEM 6.1, the default repository based ClassLoader was replaced with the new FSClassLoader (File System ClassLoader). This ClassLoader offers higher performance and throughput, however it removes a valuable tool for developers to debug errors in JSP scripts. In previous versions of AEM, developers could navigate to /var/classes and drill down through the heirarchy to find the Java file generated from the JSP scripts. In AEM 6.1, as the class and java files are now stored in the filesystem, this is no longer possible.
Surprised ! Since AEM 6.1 no more compiled JSP files in /var/classes https://t.co/JYJr7yPiZP #AEM6— Przemo Pakulski (@pacoolsky) June 3, 2015
Currently, to find the appropriate files, you will need to locate the bundle ID for the FSClassLoader bundle, then the java files will be located at:
Obviously, this is significantly more difficult than the previous method. After pondering this for a bit, I created a new OSGi Console plugin. This plugin is available as a download in the bundle Commons FileSystem ClassLoader version 1.0.2 from the Apache Sling website:
The new plugin lists all of the Java files currently generated from the JSPs:
And allows you to view a specific Java file (as well as downloading the .class and .deps files):
Hopefully this new OSGi console will be helpful for anyone developing JSPs in AEM 6.1!