{"record":{"id":"7b1e20f68d59926b","repo":"apache/pulsar","slug":"command-factory-name-does-not-provide-a-comma","errorCode":null,"errorMessage":"Command Factory `${name}` does NOT provide a Command Factory implementation","messagePattern":"Command Factory `(.+?)` does NOT provide a Command Factory implementation","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CustomCommandFactoryProvider.java","lineNumber":156,"sourceCode":"\n        return ObjectMapperFactory.getYamlMapper().reader().readValue(\n                configStr, CustomCommandFactoryDefinition.class\n        );\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private static CustomCommandFactory load(CustomCommandFactoryMetaData metadata,\n                                                   String narExtractionDirectory)\n            throws IOException {\n        final File narFile = metadata.getArchivePath().toAbsolutePath().normalize().toFile();\n        NarClassLoader ncl = NarClassLoaderBuilder.builder()\n                .narFile(narFile)\n                .parentClassLoader(CustomCommandFactory.class.getClassLoader())\n                .extractionDirectory(narExtractionDirectory)\n                .build();\n        CustomCommandFactoryDefinition def = getCustomCommandFactoryDefinition(ncl);\n        if (StringUtils.isBlank(def.getFactoryClass())) {\n            throw new IOException(\"Command Factory `\" + def.getName() + \"` does NOT provide a Command Factory\"\n                    + \" implementation\");\n        }\n\n        try {\n            Class commandFactoryClass = ncl.loadClass(def.getFactoryClass());\n            Object factory = commandFactoryClass.getDeclaredConstructor().newInstance();\n            if (!(factory instanceof CustomCommandFactory)) {\n                throw new IOException(\"Class \" + def.getFactoryClass()\n                        + \" does not implement CustomCommandFactory interface\");\n            }\n           return (CustomCommandFactory) factory;\n        } catch (Exception e) {\n            if (e instanceof IOException) {\n                throw (IOException) e;\n            }\n            log.error().exception(e).attr(\"factoryClass\", def.getFactoryClass())\n                    .log(\"Failed to load class\");\n            throw new IOException(e);","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CustomCommandFactoryProvider.java#L138-L174","documentation":"NAR loading failure in CustomCommandFactoryProvider.load: the archive defined in the factory metadata was loaded, but its configuration/NAR does not yield a CustomCommandFactory implementation (missing or wrong service entry), so the CLI extension cannot be instantiated; the named NAR is the faulty artifact.","triggerScenarios":"Thrown at pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CustomCommandFactoryProvider.java:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the factory definition in the NAR's config to name the implementation class","Rebuild the extension NAR with a proper CustomCommandFactory implementation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}