find no extensions in loaded plugin

3 views
Skip to first unread message

Christian Eugster

unread,
Aug 6, 2025, 2:56:16 AMAug 6
to pf4j
Hi, I have a plugin in my app that is loaded, while starting the app. When I try to read the extensions provided in this plugin, I get an empty result though I provide an META-INF/extensions.idx with the extension class. I seems to be a class loader issue: The class that implements the interface ExtensionPoint is an abstract class that is then extended by plugin classes. The abstract class has not the same classloader instance as the extending class.  I see this in the Abstract ExtensionFinder class at the method 

public <T> List<ExtensionWrapper<T>> find(Class<T> type, String pluginId) {


I tried several options described in stackoverflow.com like e.g.


https://stackoverflow.com/questions/53280499/why-is-the-result-of-pluginmanager-getextensions-emptyclass


How do I achieve to get the same classLoader?


deceba...@gmail.com

unread,
Aug 6, 2025, 7:36:20 AMAug 6
to pf4j

Hi,

Take a look on GitHub issues (https://github.com/pf4j/pf4j/issues) if you find something useful for your scenarios in the closed issue.
In the end if the problem persists please create a new issue on GitHub with details.
Also try to investigate a little the problem (debug, take a look in pf4j's log, ..). Also take a look on https://pf4j.org/doc/troubleshooting.html.

Regards,
Decebal
Reply all
Reply to author
Forward
0 new messages