{"record":{"id":"0a7ab7ab45903c77","repo":"apache/dubbo","slug":"not-find-extension-name","errorCode":null,"errorMessage":"Not find extension: ${name}","messagePattern":"Not find extension: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java","lineNumber":552,"sourceCode":"    }\n\n    @SuppressWarnings(\"unchecked\")\n    public List<T> getLoadedExtensionInstances() {\n        checkDestroyed();\n        List<T> instances = new ArrayList<>();\n        cachedInstances.values().forEach(holder -> instances.add((T) holder.get()));\n        return instances;\n    }\n\n    /**\n     * Find the extension with the given name.\n     *\n     * @throws IllegalStateException If the specified extension is not found.\n     */\n    public T getExtension(String name) {\n        T extension = getExtension(name, true);\n        if (extension == null) {\n            throw new IllegalArgumentException(\"Not find extension: \" + name);\n        }\n        return extension;\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public T getExtension(String name, boolean wrap) {\n        checkDestroyed();\n        if (StringUtils.isEmpty(name)) {\n            throw new IllegalArgumentException(\"Extension name == null\");\n        }\n        if (\"true\".equals(name)) {\n            return getDefaultExtension();\n        }\n        String cacheKey = name;\n        if (!wrap) {\n            cacheKey += \"_origin\";\n        }\n        final Holder<Object> holder = getOrCreateHolder(cacheKey);","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java#L534-L570","documentation":"Thrown by ExtensionLoader.getExtension(String name) when the internal getExtension(name, true) returns null, meaning no extension implementation with that name was found in the SPI configuration. This is the single most common Dubbo SPI error: the requested name is not declared in any META-INF/dubbo/, META-INF/dubbo/internal/, or META-INF/services/ SPI configuration file for the given extension type.","triggerScenarios":"Requesting an extension by a name that is misspelled, not registered, or from a missing Dubbo module. For example, getExtension(\"dubbo\") on Protocol when dubbo-rpc-dubbo is not on the classpath, or getExtension(\"roundrobbin\") instead of \"roundrobin\" on LoadBalance. Also triggered when a custom SPI config file has a syntax error or wrong path.","commonSituations":"Missing Maven/Gradle dependency for the protocol, serialization, or registry implementation. Typo in the extension name in XML/YAML/annotation configuration. SPI config file placed in the wrong META-INF subdirectory. Custom extension class fails to compile or load (then it's excluded from the name map). After upgrading Dubbo, an extension was renamed or moved to a different artifact.","solutions":["Check the extension name spelling against the SPI config file in META-INF/dubbo/<fully-qualified-interface-name> or META-INF/dubbo/internal/.","Verify the Maven/Gradle dependency providing that extension implementation is on the classpath (e.g., dubbo-rpc-dubbo for the 'dubbo' protocol).","If it is a custom extension, ensure the SPI config file exists with correct format: 'name=fully.qualified.ClassName' and the class is loadable.","Enable DEBUG logging for org.apache.dubbo.common.extension to see which extensions are loaded and which fail.","Call loader.getSupportedExtensions() at runtime to list all registered names for the type."],"exampleFix":"// before — typo or missing dep\nProtocol protocol = loader.getExtension(\"dubboo\"); // typo\n\n// after — correct name and ensure dependency\nProtocol protocol = loader.getExtension(\"dubbo\");\n// ensure pom.xml includes:\n// <dependency>\n//   <groupId>org.apache.dubbo</groupId>\n//   <artifactId>dubbo-rpc-dubbo</artifactId>\n// </dependency>","handlingStrategy":"validation","validationCode":"Set<String> supported = loader.getSupportedExtensions();\nif (!supported.contains(name)) {\n    throw new IllegalArgumentException(\n        \"Extension '\" + name + \"' not found for type \" + type\n        + \". Available: \" + supported);\n}\nT ext = loader.getExtension(name);","typeGuard":null,"tryCatchPattern":"try {\n    T ext = loader.getExtension(name);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Not find extension\")) {\n        log.error(\"Extension '{}' not found. Available extensions: {}\",\n            name, loader.getSupportedExtensions());\n    }\n    throw e;\n}","preventionTips":["Keep a reference list of valid extension names per SPI type in your project documentation.","Use loader.getSupportedExtensions() during startup to verify expected extensions are registered.","Ensure all required Dubbo Maven/Gradle dependencies are declared — missing artifacts are the #1 cause.","Double-check extension name spelling against the SPI config file contents."],"tags":["dubbo-spi","not-found","configuration","dependency","extension-system"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}