pinpoint-apm/pinpoint · error · PinpointException

Failed to load plugin class ${className} with classLoader ${

Error message

Failed to load plugin class ${className} with classLoader ${classLoader}

What it means

Wrap-around failure in PlainClassLoaderHandler.injectClass: any exception raised while loading a plugin class through the plugin's own class loader is rethrown as an IllegalStateException naming the class and class loader. It fires when the plugin jar does not actually contain the requested class, the class fails verification/linking, or the target class loader refuses to delegate, meaning plugin bytecode is incompatible or missing at runtime. The input at fault is the className/classLoader pair; deploy a consistent plugin jar and verify the class belongs to a plugin package before injection.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/classloading/PlainClassLoaderHandler.java:81

        this.pluginConfig = Objects.requireNonNull(pluginConfig, "pluginConfig");
        this.pluginJarReader = new JarReader(pluginConfig.getPluginJarFile());
    }

    @Override
    @SuppressWarnings("unchecked")
    public <T> Class<? extends T> injectClass(ClassLoader classLoader, String className) {
        if (classLoader == Object.class.getClassLoader()) {
            throw new IllegalStateException("BootStrapClassLoader");
        }

        try {
            if (!isPluginPackage(className, classLoader)) {
                return loadClass(classLoader, className);
            }
            return (Class<T>) injectClass0(classLoader, className);
        } catch (Exception e) {
            logger.warn("Failed to load plugin class {} with classLoader {}", className, classLoader, e);
            throw new PinpointException("Failed to load plugin class " + className + " with classLoader " + classLoader, e);
        }
    }

    @Override
    public InputStream getResourceAsStream(ClassLoader targetClassLoader, String internalName) {
        try {
            final String name = JavaAssistUtils.jvmNameToJavaName(internalName);
            if (!isPluginPackage(name, targetClassLoader)) {
                return targetClassLoader.getResourceAsStream(internalName);
            }

            getClassLoaderAttachment(targetClassLoader, internalName);
            final InputStream inputStream = getPluginInputStream(internalName);
            if (inputStream != null) {
                return inputStream;
            }

            if (logger.isInfoEnabled()) {

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Confirm the plugin jar containing the class is deployed with the agent
  2. Check for classloader isolation issues (e.g. PARENT_FIRST vs agent-first delegation)
  3. Look for static initializer or linkage errors in the plugin class itself
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/classloading/PlainClassLoaderHandler.java:81 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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