What Plugin is providing this class?


  • You are writing a groovy script which uses a particular library, and the script
    is throwing a groovy.lang.MissingMethodException.
  • You are migrating jobs from one Jenkins instance to another. When your job
    runs, you see ‘Unable to resolve class org.foo’.
  • You need to know which library is providing the class you are using.



Jenkins has a complex, modular architecture which means each plugin gets its own ClassLoader which altogether form a hierarchy rooted at the Jenkins core ClassLoader. To locate the plugin which can load a specific class use the following Groovy script:

String className = "<enter fully qualified class name here>"

def clazzResource = className.replaceAll("\\.", "/") + ".class"
println "Looking for: ${clazzResource}\n"
Jenkins.instance.pluginManager.activePlugins.forEach { PluginWrapper plugin ->
    def c = plugin.classLoader.getResources(clazzResource)
    if (c.hasMoreElements()) {
        println "Found in ${plugin}"
        println Collections.list(c).join("\n") + "\n"


For example, let’s say I would like to know which plugin is providing the snakeyaml
Yaml utilities. Go to the Jenkins Script Console, paste the above script and replace the placeholder like this:

String className = "org.yaml.snakeyaml.Yaml"

You should see something similar as a result:

Looking for: org/yaml/snakeyaml/Yaml.class

Found in Plugin:blueocean-rest-impl

Found in Plugin:kubernetes



Dependencies and Class Loading

Have more questions?


Please sign in to leave a comment.