neva-dev / felix-search-webconsole-plugin

Search Web Console Plugin for Apache Felix
https://bintray.com/neva-dev/maven-public/felix-search-webconsole-plugin
Apache License 2.0
94 stars 21 forks source link

Plugin stopped working on latest AEM SDK version #28

Closed vivekmalviya0104 closed 6 months ago

vivekmalviya0104 commented 7 months ago

With the new versions of AEM SDK, the search stopped working and ajax call to /system/console/search/by-phrase returns the content of plugin.html itself instead of returning the json output from ByPhraseServlet. Tried to debug the code but ByPhraseServlet is never called. Not sure if this is binding issue because no error appears in the log and bundle [com.neva.felix.webconsole.plugins.search] is in Active state. The last aem-sdk working version was v2023.9.13665.20230927T063259Z-230800.

krystian-panek-wttech commented 7 months ago

Seems that something have changed on the felix framework side. The question if the change is a bug or a new feature that we need to adapt into 🤔🙂 I appreciate the help from your side. If you will find the cause and a fix I offer that then I will quickly release it and make avaliable to the others. Right now I pretty busy in another project and not using SDK at the moment so I am not sure when I will be able to handle it by myself.

Greetings, Krystian

vivekmalviya0104 commented 7 months ago

thanks for the response. I tried to debug the start event of the bundle on both SDK(working & not working one) and on both the instances the rest servlets and providers are registered but in the latest sdk instance it doesn't find the services to bind. working-instance:

Capture d’écran 2023-11-24 à 17 32 23

Non-working-instance:

Capture d’écran 2023-11-24 à 17 38 44
bencebarna commented 7 months ago

Hi!

The same happens with AEM 6.5 since SP19.

Looks like in AEM 6.5.19 Apache Felix Web Management Console has been upgraded to version 4.9.6. The search worked on SP17 which upgraded Webconsole to version 4.8.4.

Based on the release notes of the Webconsole version 4.9.0 has deprecated javax.servlet API: https://github.com/apache/felix-dev/tree/master/webconsole#changes-in-490-31aug23 . It's possible these changes are not backward compatible.

When I have some time I will try check if that's the case and how we can adjust to it.

Regards, Bence

krystian-panek-wttech commented 7 months ago

whenever you will provide a fix I will test it and release quickly ;)

thanks!

krystian-panek-wttech commented 6 months ago

fixed and released in https://github.com/neva-dev/felix-search-webconsole-plugin/releases/tag/2.0.2

thanks @vivekmalviya0104 and @bencebarna for reporting and investigations ;)

krystian-panek-wttech commented 6 months ago

@vivekmalviya0104 the problem was that usually, the WebConsole plugin is a single Servlet. This plugin consists of plugin servlet + n additional servlets and they were registered by using the OSGi HTTP service directly. For some reason, it stopped working. I used HTTP whiteboard instead and it works now.

vivekmalviya0104 commented 6 months ago

Tested and works absolutely fine. Thanks a lot @krystian-panek-wttech for the fix.