April 7, 2020
Estimated Post Reading Time ~

Apache Felix Search Web Console Plugin


You might need to search for the bundles and decompile classes while dealing with the following kind of scenarios:
  • When you’re working on AEM customizations, you would need to have a deeper understanding of OOTB functionalities as it would help in implementing customizations easily. So, you can decompile the OOTB bundles and take a look at how the OOTB functionalities have been implemented.
  • There will be times when you might get NPE or other exceptions coming from the internal AEM APIs and you are clueless about what could be wrong. If you happen to have the JAR of the related the feature you can easily decompile the JAR and take a look at what exactly might be causing the error or debug it.
Hence, having the ability to decompile a JAR can be very helpful in the development or debugging process. Decompiling the JAR is the easy part. However, finding and getting the JAR in AEM can be more difficult.
This searching and decompiling JAR can be easily done using Apache Felix Search Web Console Plugin.
Just have a look at https://github.com/neva-dev/felix-search-webconsole-plugin
This plugin works on OSGi distributions based on Apache Felix such as Apache Sling, Apache Karaf, Apache ServiceMix, etc. and it saves a lot of the time required for debugging purposes.

Plugin features:

Using the above plugin you can:
  • Search for bundles
  • Decompile classes
  • View services
  • Quickly enter configurations.

Download and setup:

To know how to set up this plugin and start using the above features, please go through this README – https://github.com/neva-dev/felix-search-webconsole-plugin/blob/develop/README.md
Once the setup is done, you are ready to explore these awesome features.

Example:

Let us see an example of how we can search and decompile classes.
  • Let us consider the Breadcrumb core component (i.e. /apps/core/wcm/components/breadcrumb/v1/breadcrumb/breadcrumb.html)
You can see from below screenshot that, we will be hitting “com.adobe.cq.wcm.core.components.models.Breadcrumb”. So, let us search for Breadcrumb class and decompile it.

breadcrumb-component-html
Breadcrumb Component


search-result
Search Result
Select the relevant class you are searching for as shown in the above screenshot. You will see three icons in the “Actions” column. They are –
1st icon – Download bundle
2nd icon – Show details
3rd icon – Decompile class
Click on the decompile class icon. You will see the decompiled class as shown in the below screenshot.

decompiled-class
Decompiled class

Source: https://aem.adobemarketingclub.com/apache-felix-search-web-console-plugin/


By aem4beginner

No comments:

Post a Comment

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