{"record":{"id":"e9052ace91c09200","repo":"alibaba/canal","slug":"extension-instance-name-class-could-not","errorCode":null,"errorMessage":"Extension instance(name: {}, class: {})  could not be instantiated: class could not be found","messagePattern":"Extension instance\\(name: (.+?), class: (.+?)\\)  could not be instantiated: class could not be found","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/support/ExtensionLoader.java","lineNumber":166,"sourceCode":"        return (T) instance;\n    }\n\n    /**\n     * 返回缺省的扩展，如果没有设置则返回<code>null</code>\n     */\n    public T getDefaultExtension() {\n        getExtensionClasses();\n        if (null == cachedDefaultName || cachedDefaultName.length() == 0 || \"true\".equals(cachedDefaultName)) {\n            return null;\n        }\n        return getExtension(cachedDefaultName);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private T createExtension(String name) {\n        Class<?> clazz = getExtensionClasses().get(name);\n        if (clazz == null) {\n            throw new IllegalStateException(\"Extension instance(name: \" + name + \", class: \" + type\n                                            + \")  could not be instantiated: class could not be found\");\n        }\n        try {\n            T instance = (T) EXTENSION_INSTANCES.get(clazz);\n            if (instance == null) {\n                EXTENSION_INSTANCES.putIfAbsent(clazz, (T) clazz.newInstance());\n                instance = (T) EXTENSION_INSTANCES.get(clazz);\n            }\n            return instance;\n        } catch (Throwable t) {\n            throw new IllegalStateException(\"Extension instance(name: \" + name + \", class: \" + type\n                                            + \")  could not be instantiated: \" + t.getMessage(),\n                t);\n        }\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private T createExtension(String name, String key) {","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/support/ExtensionLoader.java#L148-L184","documentation":"Error \"Extension instance(name: {}, class: {})  could not be instantiated: class could not be found\" thrown in alibaba/canal.","triggerScenarios":"Thrown at client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/support/ExtensionLoader.java:166 when the library encounters an invalid state.","commonSituations":"Extension class not found on the classpath. Verify the plugin jar is deployed and the class name in the SPI file matches exactly; class-not-found at load time should list the searched locations.","solutions":["Ensure the extension implementation class is on the classpath (adapter jar included in the lib/plugin directory).","Check META-INF/canal SPI resource files reference the correct fully-qualified class name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}