jenkinsci/jenkins · error · IOException

Failed to load {}

Error message

Failed to load {}

What it means

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).

Source

Thrown at core/src/main/java/hudson/ClassicPluginStrategy.java:110

        this.pluginManager = pluginManager;
    }

    @Override public String getShortName(File archive) throws IOException {
        Manifest manifest;
        if (!archive.exists()) {
            throw new FileNotFoundException("Failed to load " + archive + ". The file does not exist");
        } else if (!archive.isFile()) {
            throw new FileNotFoundException("Failed to load " + archive + ". It is not a file");
        }

        if (isLinked(archive)) {
            manifest = loadLinkedManifest(archive);
        } else {
            try (JarFile jf = new JarFile(archive, false)) {
                manifest = jf.getManifest();
            } catch (IOException ex) {
                // Mention file name in the exception
                throw new IOException("Failed to load " + archive, ex);
            }
        }
        return PluginWrapper.computeShortName(manifest, archive.getName());
    }

    private static boolean isLinked(File archive) {
        return archive.getName().endsWith(".hpl") || archive.getName().endsWith(".jpl");
    }

    private static Manifest loadLinkedManifest(File archive) throws IOException {
            // resolve the .hpl file to the location of the manifest file
            try {
                // Locate the manifest
                String firstLine;
                try (InputStream manifestHeaderInput = Files.newInputStream(archive.toPath())) {
                    firstLine = IOUtils.readFirstLine(manifestHeaderInput, "UTF-8");
                } catch (InvalidPathException e) {
                    throw new IOException(e);

View on GitHub (pinned to 2e228ff40b)

Solutions

  1. Re-download the plugin from a trusted source (update center) and verify its size/checksum.
  2. Confirm the file is a valid ZIP/JAR ('unzip -l file.jpi' or 'jar tf file.jpi').
  3. Remove the corrupt archive from the plugins directory and restart to let Jenkins re-fetch it.
Defensive patterns

Strategy: validation

Validate before calling

// Validate the archive is a readable ZIP/JAR before handing it to the strategy
try (JarFile ignored = new JarFile(archive, false)) {
    // ok
} catch (IOException e) {
    throw new IOException(archive + " is not a valid JAR/ZIP", e);
}

Try / catch

try {
    strategy.getShortName(archive);
} catch (IOException e) {
    // re-download the plugin and retry once
}

Prevention

When it happens

Trigger: 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.

Common situations: Plugin download interrupted; mirror returned an error page saved as .jpi; filesystem corruption; wrong file extension.

Related errors


AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14). Data as JSON: /api/errors/bb8fc92170fddee6. Report an issue: GitHub.