apache/seatunnel · error · DorisConnectorException
CONFIG_VALIDATION_FAILED
CONFIG_VALIDATION_FAILED
Error message
PluginName: <pluginName>, PluginType: SINK, Message: Cannot find Doris catalog factory
What it means
DorisSink.getSaveModeHandler() discovers the Doris CatalogFactory via SPI to build a save-mode (auto table creation) handler. If no factory named "Doris" is registered on the classpath it throws DorisConnectorException with CONFIG_VALIDATION_FAILED. The save-mode feature requires the catalog factory plugin to be discoverable.
Source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/DorisSink.java:151
public Optional<Serializer<DorisCommitInfo>> getCommitInfoSerializer() {
return Optional.of(new DorisCommitInfoSerializer());
}
@Override
public Optional<SaveModeHandler> getSaveModeHandler() {
// Load the JDBC driver in to DriverManager
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (Exception e) {
log.warn("Failed to load JDBC driver com.mysql.cj.jdbc.Driver ", e);
}
CatalogFactory catalogFactory =
discoverFactory(
Thread.currentThread().getContextClassLoader(),
CatalogFactory.class,
"Doris");
if (catalogFactory == null) {
throw new DorisConnectorException(
SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
String.format(
"PluginName: %s, PluginType: %s, Message: %s",
getPluginName(), PluginType.SINK, "Cannot find Doris catalog factory"));
}
DorisCatalog catalog =
(DorisCatalog)
catalogFactory.createCatalog(catalogFactory.factoryIdentifier(), config);
return Optional.of(
new DorisSaveModeHandler(
config.get(DorisSinkOptions.SCHEMA_SAVE_MODE),
config.get(DorisSinkOptions.DATA_SAVE_MODE),
catalog,
catalogTable,
config.get(DorisSinkOptions.CUSTOM_SQL),
dorisSinkConfig.getPartitions()));
}View on GitHub (pinned to cf67b549a7)
Solutions
- Reinstall the connector: `sh bin/install-plugin.sh <version>` and ensure connector-doris jar is in the plugins dir
- Verify META-INF/services/org.apache.seatunnel.api.table.factory.CatalogFactory lists the Doris factory inside the jar
- Check for jar conflicts/version mismatches in the plugin directory
- If not using save-mode, ensure it isn't enabled in the sink config
Defensive patterns
Strategy: validation
Validate before calling
// check SPI presence: // unzip -p plugins/doris/connector-doris-*.jar META-INF/services/org.apache.seatunnel.api.table.factory.CatalogFactory | grep -i doris
Try / catch
try {
SaveModeHandler h = sink.getSaveModeHandler();
} catch (DorisConnectorException e) {
if (e.getErrorCode() == SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED)
log.error("Doris catalog factory missing from classpath");
} Prevention
- Run `sh bin/install-plugin.sh <version>` after install/upgrade
- Keep the full connector-doris jar (don't hand-strip classes)
- Avoid custom classloaders that drop thread-context classloader SPI discovery
When it happens
Trigger: Using save_mode / auto-table-creation features with the Doris sink when the Doris connector jar (or its catalog factory SPI entry) is missing from the plugin directory, or a shaded/classloader issue hides the SPI file.
Common situations: Incomplete `install-plugin.sh` installation; running with a trimmed fat jar lacking META-INF/services entry; custom classloader not exposing Thread.currentThread().getContextClassLoader(); connector version mismatch after upgrade.
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
- Could not find any factories that implement '%s' in the clas
- Multiple factories for identifier '%s' that implement '%s' f
- Could not load service provider for factories.
- CONFIG_VALIDATION_FAILED
- SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6c84b2cd87fc2d44.
Report an issue: GitHub.