pinpoint-apm/pinpoint · error · PluginException

Manifest error

Error message

 Manifest error

What it means

PluginManifest.getManifest() wraps IOException thrown by JarFile.getManifest() into this PluginException, indicating the jar's manifest could not be read. A jar without a readable manifest cannot expose the plugin's Pinpoint-Plugin metadata needed for loading.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/plugin/PluginManifest.java:66

        String pluginId = JarFileUtils.getValue(mainAttributes, PluginJar.PINPOINT_PLUGIN_ID, null);
        String pluginCompilerVersion = JarFileUtils.getValue(mainAttributes, PluginJar.PINPOINT_PLUGIN_COMPILER_VERSION, null);

        String pluginPackages = JarFileUtils.getValue(mainAttributes, PluginJar.PINPOINT_PLUGIN_PACKAGE, PluginJar.DEFAULT_PINPOINT_PLUGIN_PACKAGE_NAME);

        List<String> pluginPackageList = StringUtils.tokenizeToStringList(pluginPackages, ",");

        String pluginPackageRequirements = JarFileUtils.getValue(mainAttributes, PluginJar.PINPOINT_PLUGIN_PACKAGE_CLASS_REQUIREMENTS, null);
        List<String> pluginPackageRequirementList = StringUtils.tokenizeToStringList(pluginPackageRequirements, ",");

        return new PluginManifest(pluginId, pluginCompilerVersion, pluginPackageList, pluginPackageRequirementList);
    }

    private static Manifest getManifest(JarFile jarFile) {
        try {
            return jarFile.getManifest();
        } catch (IOException e) {
            throw new PluginException(jarFile.getName() + " Manifest error", e);
        }
    }

    public String getPluginId() {
        return pluginId;
    }

    public String getPluginCompilerVersion() {
        return pluginCompilerVersion;
    }

    public List<String> getPluginPackages() {
        return pluginPackages;
    }

    public List<String> getPluginPackageRequirements() {
        return pluginPackageRequirements;
    }

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Verify jar integrity: `jar tf <plugin.jar>` or `unzip -t`; redeploy if corrupt
  2. Rebuild the plugin ensuring the manifest is generated (maven-jar-plugin with addDefaultSpecificationEntries/classpath or shade plugin)
  3. Confirm the jar contains META-INF/MANIFEST.MF: `unzip -l plugin.jar | grep MANIFEST`

Example fix

<!-- before: no manifest config -->
<artifactId>maven-jar-plugin</artifactId>
<!-- after -->
<plugin><artifactId>maven-jar-plugin</artifactId><configuration><archive><manifest><addDefaultImplementationEntries>true</addDefaultImplementationEntries></manifest></archive></configuration></plugin>
Defensive patterns

Strategy: try-catch

Validate before calling

try (JarFile jf = new JarFile(pluginPath.toFile())) { if (jf.getManifest() == null) throw new IllegalStateException("No manifest in " + pluginPath); }

Type guard

boolean hasManifest(Path jar) { try (JarFile jf = new JarFile(jar.toFile())) { return jf.getManifest() != null; } catch (IOException e) { return false; } }

Try / catch

try { PluginManifest.manifest(jarPath); } catch (PluginException e) { log.error("Unreadable/corrupt plugin manifest in {}: {}", jarPath, e.getMessage()); }

Prevention

When it happens

Trigger: Reading a plugin jar whose MANIFEST.MF is missing, corrupted, or whose jar file is a broken/invalid zip — JarFile.getManifest() throws IOException and this error propagates during plugin loading at agent startup.

Common situations: Plugin jar truncated during upload/deployment, jar built without maven-jar-plugin manifest config (no Manifest.txt), corrupted jar after failed transfer, or a text file renamed to .jar.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/db9c649d4956bbed. Report an issue: GitHub.