Different ClassLoaders + Gradle dependencies Follow
Hello, I have a problem with loading class from my Gradle dependency.
How I understand. There are I have 2 different ClassLoaders (in my plugin):
1. Context ClassLoader -> Thread.currentThread().getContextClassLoader(): com.intellij.util.lang.UrlClassLoader.
method getUrls() returns urls: JRE/lib/... + my Intellij project libs (in my case - Rider/lib/...).
2. com.intellij.ide.plugins.cl.PluginClassLoader extends com.intellij.util.lang.UrlClassLoader
method getUrls() returns my Gradle dependencies urls.
PluginClassLoader can see urls from UrlClassLoader, but I have third-party class javax.xml.ws.spi.FactoryFinder, that
calls Thread.currentThread().getContextClassLoader() and gets UrlClassLoader. Then I need to load class javax.xml.ws.spi.ProviderImpl
from Gradle dependency, but UrlClassLoader knows nothing about it.
Please sign in to leave a comment.
Were you able to resolve this? I have similar problem
I also have this problem. How do I get the right class loader to load from my dependencies?
I hit this problem when I am trying to apply jaxws files for my plugin.
Can someone know how to fix it or is there a workaround to solve this?
Any one had luck with this?