apache/seatunnel · error · SeaTunnelEngineException
Could not find any factories that implement '${factoryClass}
Error message
Could not find any factories that implement '${factoryClass}' in the classpath. What it means
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.
Source
Thrown at seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/utils/FactoryUtil.java:63
.filter(f -> factoryClass.isAssignableFrom(f.getClass()))
.filter(
t -> {
try {
return t.getClass()
.getMethod("factoryIdentifier")
.invoke(t)
.equals(factoryIdentifier);
} catch (IllegalAccessException
| InvocationTargetException
| NoSuchMethodException e) {
throw new SeaTunnelEngineException(
"Failed to call factoryIdentifier method.");
}
})
.collect(Collectors.toList());
if (foundFactories.isEmpty()) {
throw new SeaTunnelEngineException(
String.format(
"Could not find any factories that implement '%s' in the classpath.",
factoryClass.getName()));
}
if (foundFactories.size() > 1) {
throw new SeaTunnelEngineException(
String.format(
"Multiple factories for identifier '%s' that implement '%s' found in the classpath.\n\n"
+ "Ambiguous factory classes are:\n\n"
+ "%s",
factoryIdentifier,
factoryClass.getName(),
foundFactories.stream()
.map(f -> f.getClass().getName())
.sorted()
.collect(Collectors.joining("\n"))));
}View on GitHub (pinned to cf67b549a7)
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.
Example fix
# before (job config referencing uninstalled connector) plugin_name = "Kafaka" # after plugin_name = "Kafka"
Defensive patterns
Strategy: validation
Validate before calling
File jar = new File("connectors/connector-jdbc-2.3.8.jar");
if (!jar.exists()) throw new IllegalStateException("connector jar not installed"); Try / catch
try { FactoryUtil.discoverFactory(SourceFactory.class, cl, pluginName); } catch (SeaTunnelEngineException e) { throw new IllegalStateException("Plugin '" + pluginName + "' not installed; run install-plugin.sh", e); } Prevention
- 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.
When it happens
Trigger: Calling discoverFactory(SomeFactory.class, classLoader, "MyFakeConnector") where no META-INF/services entry registers a factory whose factoryIdentifier() returns that identifier.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED
- Failed to call factoryIdentifier method.
- Could not find any factories that implement '%s' in the clas
- Could not load service provider for factories.
- Could not find any factories that implement '%s' in the clas
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a7d5a362ab078aa9.
Report an issue: GitHub.