{"record":{"id":"a4168b2a409d3b95","repo":"pinpoint-apm/pinpoint","slug":"failed-to-load-plugin-class-classname-with-clas-a4168b","errorCode":null,"errorMessage":"Failed to load plugin class ${className} with classLoader ${classLoader}","messagePattern":"Failed to load plugin class (.+?) with classLoader (.+?)","errorType":"exception","errorClass":"PinpointException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/classloading/PlainClassLoaderHandler.java","lineNumber":81,"sourceCode":"        this.pluginConfig = Objects.requireNonNull(pluginConfig, \"pluginConfig\");\n        this.pluginJarReader = new JarReader(pluginConfig.getPluginJarFile());\n    }\n\n    @Override\n    @SuppressWarnings(\"unchecked\")\n    public <T> Class<? extends T> injectClass(ClassLoader classLoader, String className) {\n        if (classLoader == Object.class.getClassLoader()) {\n            throw new IllegalStateException(\"BootStrapClassLoader\");\n        }\n\n        try {\n            if (!isPluginPackage(className, classLoader)) {\n                return loadClass(classLoader, className);\n            }\n            return (Class<T>) injectClass0(classLoader, className);\n        } catch (Exception e) {\n            logger.warn(\"Failed to load plugin class {} with classLoader {}\", className, classLoader, e);\n            throw new PinpointException(\"Failed to load plugin class \" + className + \" with classLoader \" + classLoader, e);\n        }\n    }\n\n    @Override\n    public InputStream getResourceAsStream(ClassLoader targetClassLoader, String internalName) {\n        try {\n            final String name = JavaAssistUtils.jvmNameToJavaName(internalName);\n            if (!isPluginPackage(name, targetClassLoader)) {\n                return targetClassLoader.getResourceAsStream(internalName);\n            }\n\n            getClassLoaderAttachment(targetClassLoader, internalName);\n            final InputStream inputStream = getPluginInputStream(internalName);\n            if (inputStream != null) {\n                return inputStream;\n            }\n\n            if (logger.isInfoEnabled()) {","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/classloading/PlainClassLoaderHandler.java#L63-L99","documentation":"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.","triggerScenarios":"Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/classloading/PlainClassLoaderHandler.java:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the plugin jar containing the class is deployed with the agent","Check for classloader isolation issues (e.g. PARENT_FIRST vs agent-first delegation)","Look for static initializer or linkage errors in the plugin class itself"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}