{"record":{"id":"a7d5a362ab078aa9","repo":"apache/seatunnel","slug":"could-not-find-any-factories-that-implement-fac","errorCode":null,"errorMessage":"Could not find any factories that implement '${factoryClass}' in the classpath.","messagePattern":"Could not find any factories that implement '(.+?)' in the classpath\\.","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/utils/FactoryUtil.java","lineNumber":63,"sourceCode":"                            .filter(f -> factoryClass.isAssignableFrom(f.getClass()))\n                            .filter(\n                                    t -> {\n                                        try {\n                                            return t.getClass()\n                                                    .getMethod(\"factoryIdentifier\")\n                                                    .invoke(t)\n                                                    .equals(factoryIdentifier);\n                                        } catch (IllegalAccessException\n                                                | InvocationTargetException\n                                                | NoSuchMethodException e) {\n                                            throw new SeaTunnelEngineException(\n                                                    \"Failed to call factoryIdentifier method.\");\n                                        }\n                                    })\n                            .collect(Collectors.toList());\n\n            if (foundFactories.isEmpty()) {\n                throw new SeaTunnelEngineException(\n                        String.format(\n                                \"Could not find any factories that implement '%s' in the classpath.\",\n                                factoryClass.getName()));\n            }\n\n            if (foundFactories.size() > 1) {\n                throw new SeaTunnelEngineException(\n                        String.format(\n                                \"Multiple factories for identifier '%s' that implement '%s' found in the classpath.\\n\\n\"\n                                        + \"Ambiguous factory classes are:\\n\\n\"\n                                        + \"%s\",\n                                factoryIdentifier,\n                                factoryClass.getName(),\n                                foundFactories.stream()\n                                        .map(f -> f.getClass().getName())\n                                        .sorted()\n                                        .collect(Collectors.joining(\"\\n\"))));\n            }","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/utils/FactoryUtil.java#L45-L81","documentation":"Thrown by FactoryUtil.discoverFactory when no factory implementing the requested factoryClass with the given factoryIdentifier could be found via Java SPI on the classpath. SeaTunnel resolves sources/sinks/transforms by identifier through SPI service files, so an empty match means the plugin providing that identifier is not loaded.","triggerScenarios":"Calling discoverFactory(SomeFactory.class, classLoader, \"MyFakeConnector\") where no META-INF/services entry registers a factory whose factoryIdentifier() returns that identifier.","commonSituations":"Job config references a connector (e.g. FakeSource, JDBC) whose jar is not installed in $SEATUNNEL_HOME/connectors; plugin_name mapping typo; connector jar present but its META-INF/services file missing or corrupted.","solutions":["Install the missing connector plugin (sh bin/install-plugin.sh or copy the connector jar into connectors/) and add it to plugin-mapping.properties.","Check the factoryIdentifier string used in the job config or code for typos against the connector's documented identifier.","Verify the plugin jar contains META-INF/services/org.apache.seatunnel.api...Factory listing the factory implementation.","Set classloader cache/plugin settings so the engine scans the correct connectors directory."],"exampleFix":"# before (job config referencing uninstalled connector)\nplugin_name = \"Kafaka\"\n# after\nplugin_name = \"Kafka\"","handlingStrategy":"validation","validationCode":"File jar = new File(\"connectors/connector-jdbc-2.3.8.jar\");\nif (!jar.exists()) throw new IllegalStateException(\"connector jar not installed\");","typeGuard":null,"tryCatchPattern":"try { FactoryUtil.discoverFactory(SourceFactory.class, cl, pluginName); } catch (SeaTunnelEngineException e) { throw new IllegalStateException(\"Plugin '\" + pluginName + \"' not installed; run install-plugin.sh\", e); }","preventionTips":["Install connectors with bin/install-plugin.sh rather than manual copies.","Double-check plugin_name/identifier spelling against connector docs.","Keep plugin-mapping.properties in sync with installed jars."],"tags":["spi","classpath","plugin-not-found","zeta-engine"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}