{"record":{"id":"bb8fc92170fddee6","repo":"jenkinsci/jenkins","slug":"failed-to-load","errorCode":null,"errorMessage":"Failed to load {}","messagePattern":"Failed to load (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/ClassicPluginStrategy.java","lineNumber":110,"sourceCode":"        this.pluginManager = pluginManager;\n    }\n\n    @Override public String getShortName(File archive) throws IOException {\n        Manifest manifest;\n        if (!archive.exists()) {\n            throw new FileNotFoundException(\"Failed to load \" + archive + \". The file does not exist\");\n        } else if (!archive.isFile()) {\n            throw new FileNotFoundException(\"Failed to load \" + archive + \". It is not a file\");\n        }\n\n        if (isLinked(archive)) {\n            manifest = loadLinkedManifest(archive);\n        } else {\n            try (JarFile jf = new JarFile(archive, false)) {\n                manifest = jf.getManifest();\n            } catch (IOException ex) {\n                // Mention file name in the exception\n                throw new IOException(\"Failed to load \" + archive, ex);\n            }\n        }\n        return PluginWrapper.computeShortName(manifest, archive.getName());\n    }\n\n    private static boolean isLinked(File archive) {\n        return archive.getName().endsWith(\".hpl\") || archive.getName().endsWith(\".jpl\");\n    }\n\n    private static Manifest loadLinkedManifest(File archive) throws IOException {\n            // resolve the .hpl file to the location of the manifest file\n            try {\n                // Locate the manifest\n                String firstLine;\n                try (InputStream manifestHeaderInput = Files.newInputStream(archive.toPath())) {\n                    firstLine = IOUtils.readFirstLine(manifestHeaderInput, \"UTF-8\");\n                } catch (InvalidPathException e) {\n                    throw new IOException(e);","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/ClassicPluginStrategy.java#L92-L128","documentation":"IOException thrown by ClassicPluginStrategy.getShortName when opening the archive as a JarFile fails. The path exists and is a file, but java.util.jar.JarFile could not parse it (not a valid ZIP/JAR, truncated download, or unreadable).","triggerScenarios":"The plugin archive is corrupt: incomplete download, a .jpi that is actually HTML/text, a truncated transfer, or a file that is not a valid JAR.","commonSituations":"Plugin download interrupted; mirror returned an error page saved as .jpi; filesystem corruption; wrong file extension.","solutions":["Re-download the plugin from a trusted source (update center) and verify its size/checksum.","Confirm the file is a valid ZIP/JAR ('unzip -l file.jpi' or 'jar tf file.jpi').","Remove the corrupt archive from the plugins directory and restart to let Jenkins re-fetch it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate the archive is a readable ZIP/JAR before handing it to the strategy\ntry (JarFile ignored = new JarFile(archive, false)) {\n    // ok\n} catch (IOException e) {\n    throw new IOException(archive + \" is not a valid JAR/ZIP\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    strategy.getShortName(archive);\n} catch (IOException e) {\n    // re-download the plugin and retry once\n}","preventionTips":["Verify plugin downloads with a checksum before placing them in the plugins directory.","Run 'jar tf' on suspect archives before startup.","Fetch plugins from the official update center."],"tags":["jenkins","plugin-loading","corrupt-archive","jar"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}