jenkinsci/jenkins · error · FileNotFoundException

Failed to load {}. The file does not exist

Error message

Failed to load {}. The file does not exist

What it means

FileNotFoundException thrown by ClassicPluginStrategy.getShortName when archive.exists() returns false. The plugin archive path supplied to load does not point to an existing filesystem entry, so Jenkins cannot read a manifest from it.

Source

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

public class ClassicPluginStrategy implements PluginStrategy {

    private static final Logger LOGGER = Logger.getLogger(ClassicPluginStrategy.class.getName());

    /**
     * Filter for jar files.
     */
    private static final FilenameFilter JAR_FILTER = (dir, name) -> name.endsWith(".jar");

    private final PluginManager pluginManager;

    public ClassicPluginStrategy(PluginManager pluginManager) {
        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) {

View on GitHub (pinned to 2e228ff40b)

Solutions

  1. Verify the plugin archive path exists on the node running Jenkins (ls -l on the absolute path).
  2. Correct the plugins directory / custom plugin location configuration so it points at a real directory.
  3. Re-download or redeploy the plugin file before starting Jenkins.
Defensive patterns

Strategy: validation

Validate before calling

File archive = new File(path);
if (!archive.exists()) {
    throw new FileNotFoundException("Plugin archive not found: " + archive.getAbsolutePath());
}

Try / catch

try {
    strategy.getShortName(archive);
} catch (FileNotFoundException e) {
    // log the absolute path and skip this plugin rather than aborting startup
}

Prevention

When it happens

Trigger: A plugin install path resolves to a missing file: the .hpi/.jpi was deleted between scheduling and loading, a relative path was resolved against the wrong working directory, or a dangling symlink was passed.

Common situations: Plugin file removed during startup; custom plugins directory pointing at a stale/symlinked path; deployment pipeline copied a path that does not exist on this node.

Related errors


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