{"record":{"id":"7d90a1682e044569","repo":"jenkinsci/jenkins","slug":"unable-to-load-from","errorCode":null,"errorMessage":"Unable to load {} from {}","messagePattern":"Unable to load (.+?) from (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/ClassicPluginStrategy.java","lineNumber":391,"sourceCode":"        // override the context classloader. This no longer makes sense,\n        // but it is left for the backward compatibility\n        ClassLoader old = Thread.currentThread().getContextClassLoader();\n        Thread.currentThread().setContextClassLoader(wrapper.classLoader);\n        try {\n            String className = wrapper.getPluginClass();\n            if (className == null) {\n                // use the default dummy instance\n                wrapper.setPlugin(new DummyImpl());\n            } else {\n                try {\n                    Class<?> clazz = wrapper.classLoader.loadClass(className);\n                    Object o = clazz.getDeclaredConstructor().newInstance();\n                    if (!(o instanceof Plugin)) {\n                        throw new IOException(className + \" doesn't extend from hudson.Plugin\");\n                    }\n                    wrapper.setPlugin((Plugin) o);\n                } catch (LinkageError | ClassNotFoundException e) {\n                    throw new IOException(\"Unable to load \" + className + \" from \" + wrapper.getShortName(), e);\n                } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n                    throw new IOException(\"Unable to create instance of \" + className + \" from \" + wrapper.getShortName(), e);\n                }\n            }\n\n            // initialize plugin\n            try {\n                Plugin plugin = wrapper.getPluginOrFail();\n                plugin.setServletContext(pluginManager.context);\n                startPlugin(wrapper);\n            } catch (Throwable t) {\n                // gracefully handle any error in plugin.\n                throw new IOException(\"Failed to initialize\", t);\n            }\n        } finally {\n            Thread.currentThread().setContextClassLoader(old);\n        }\n    }","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/ClassicPluginStrategy.java#L373-L409","documentation":"IOException thrown when ClassLoader.loadClass fails with LinkageError or ClassNotFoundException for the manifest's Plugin-Class. The named class could not be found in the plugin's classloader, or linkage (verification/resolution) failed, so the plugin cannot be instantiated.","triggerScenarios":"Plugin-Class names a class that does not exist in the archive, or the class exists but references missing/incompatible types causing a LinkageError (e.g. IncompatibleClassChangeError, NoClassDefFoundError for a dependency).","commonSituations":"Plugin depends on a library or Jenkins API version not present at runtime; class renamed/moved between plugin builds; dependency shaded away; plugin built against a newer Jenkins core than the running controller.","solutions":["Check the plugin's dependencies and build against the Jenkins core version actually running (match API baseline).","Inspect the archive to confirm the Plugin-Class is present and its dependencies are bundled in WEB-INF/lib.","Upgrade Jenkins core or downgrade the plugin to a compatible release line."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before instantiating, confirm the class is loadable in the plugin classloader\ntry {\n    Class<?> c = wrapper.classLoader.loadClass(className);\n} catch (ClassNotFoundException | LinkageError e) {\n    throw new IOException(\"Plugin-Class \" + className + \" is missing; check dependencies\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    Class<?> clazz = wrapper.classLoader.loadClass(className);\n} catch (LinkageError | ClassNotFoundException e) {\n    // align plugin build with the running Jenkins core / bundled deps\n}","preventionTips":["Build plugins against the Jenkins core version that will run them.","Bundle required dependencies in WEB-INF/lib.","Run dependency:tree to catch missing or version-mismatched libs."],"tags":["jenkins","plugin-loading","classpath","classloading"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}