{"record":{"id":"30b9e04480f56fa9","repo":"apache/seatunnel","slug":"could-not-find-any-factory-for-identifier-s-tha","errorCode":null,"errorMessage":"Could not find any factory for identifier '%s' that implements '%s' in the classpath.\n\nAvailable factory identifiers are:\n\n%s","messagePattern":"Could not find any factory for identifier '(.+?)' that implements '(.+?)' in the classpath\\.\n\nAvailable factory identifiers are:\n\n(.+?)","errorType":"validation","errorClass":"FactoryException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/FactoryUtil.java","lineNumber":357,"sourceCode":"\n    public static <T extends Factory> T discoverFactory(\n            ClassLoader classLoader, Class<T> factoryClass, String factoryIdentifier) {\n        final List<T> foundFactories = discoverFactories(classLoader, factoryClass);\n\n        if (foundFactories.isEmpty()) {\n            throw new FactoryException(\n                    String.format(\n                            \"Could not find any factories that implement '%s' in the classpath.\",\n                            factoryClass.getName()));\n        }\n\n        final List<T> matchingFactories =\n                foundFactories.stream()\n                        .filter(f -> f.factoryIdentifier().equalsIgnoreCase(factoryIdentifier))\n                        .collect(Collectors.toList());\n\n        if (matchingFactories.isEmpty()) {\n            throw new FactoryException(\n                    String.format(\n                            \"Could not find any factory for identifier '%s' that implements '%s' in the classpath.\\n\\n\"\n                                    + \"Available factory identifiers are:\\n\\n\"\n                                    + \"%s\",\n                            factoryIdentifier,\n                            factoryClass.getName(),\n                            foundFactories.stream()\n                                    .map(Factory::factoryIdentifier)\n                                    .distinct()\n                                    .sorted()\n                                    .collect(Collectors.joining(\"\\n\"))));\n        }\n\n        checkMultipleMatchingFactories(factoryIdentifier, factoryClass, matchingFactories);\n\n        return matchingFactories.get(0);\n    }\n","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/FactoryUtil.java#L339-L375","documentation":"FactoryUtil.discoverFactory throws this FactoryException when factories implementing the requested class were found, but none matches the given factoryIdentifier (case-insensitive). The message lists all available identifiers so you can correct the name.","triggerScenarios":"Calling discoverFactory(classLoader, TableSinkFactory.class, 'MySql') when no discovered factory's factoryIdentifier() equals 'MySql' — a typo or a plugin that isn't installed.","commonSituations":"Typo in source/sink plugin name in the HOCON config; using an identifier from an old SeaTunnel version that was renamed; connector jar missing while others load fine.","solutions":["Copy an identifier verbatim from the 'Available factory identifiers' list printed in the message.","Install the connector plugin if its identifier is absent from the list.","Check plugin-mapping.properties / docs for the current identifier after upgrading SeaTunnel."],"exampleFix":"// before\nsink { Jdbc-sink { ... } }\n// after\nsink { Jdbc { ... } } // identifier taken from the available-identifiers list","handlingStrategy":"validation","validationCode":"boolean exists = FactoryUtil.discoverFactories(classLoader).stream()\n    .anyMatch(f -> f.factoryIdentifier().equalsIgnoreCase(pluginId));\nif (!exists) throw new IllegalArgumentException(\"Unknown plugin identifier: \" + pluginId);","typeGuard":null,"tryCatchPattern":"try {\n    return FactoryUtil.discoverFactory(cl, TableSinkFactory.class, id);\n} catch (FactoryException e) {\n    System.err.println(e.getMessage()); // includes the available-identifier list to correct against\n    throw e;\n}","preventionTips":["Copy plugin identifiers verbatim from docs or the error's available-identifiers list.","After upgrades, re-check identifiers — they can be renamed between versions.","Install any connector whose identifier appears missing from the list."],"tags":["spi","factory","unknown-identifier","plugin"],"backgroundTag":"invalid-identifier","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}