{"record":{"id":"6c84b2cd87fc2d44","repo":"apache/seatunnel","slug":"config-validation-failed-6c84b2","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"PluginName: <pluginName>, PluginType: SINK, Message: Cannot find Doris catalog factory","messagePattern":"PluginName: <pluginName>, PluginType: SINK, Message: Cannot find Doris catalog factory","errorType":"error_code","errorClass":"DorisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/DorisSink.java","lineNumber":151,"sourceCode":"    public Optional<Serializer<DorisCommitInfo>> getCommitInfoSerializer() {\n        return Optional.of(new DorisCommitInfoSerializer());\n    }\n\n    @Override\n    public Optional<SaveModeHandler> getSaveModeHandler() {\n        // Load the JDBC driver in to DriverManager\n        try {\n            Class.forName(\"com.mysql.cj.jdbc.Driver\");\n        } catch (Exception e) {\n            log.warn(\"Failed to load JDBC driver com.mysql.cj.jdbc.Driver \", e);\n        }\n        CatalogFactory catalogFactory =\n                discoverFactory(\n                        Thread.currentThread().getContextClassLoader(),\n                        CatalogFactory.class,\n                        \"Doris\");\n        if (catalogFactory == null) {\n            throw new DorisConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: %s, PluginType: %s, Message: %s\",\n                            getPluginName(), PluginType.SINK, \"Cannot find Doris catalog factory\"));\n        }\n\n        DorisCatalog catalog =\n                (DorisCatalog)\n                        catalogFactory.createCatalog(catalogFactory.factoryIdentifier(), config);\n        return Optional.of(\n                new DorisSaveModeHandler(\n                        config.get(DorisSinkOptions.SCHEMA_SAVE_MODE),\n                        config.get(DorisSinkOptions.DATA_SAVE_MODE),\n                        catalog,\n                        catalogTable,\n                        config.get(DorisSinkOptions.CUSTOM_SQL),\n                        dorisSinkConfig.getPartitions()));\n    }","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/DorisSink.java#L133-L169","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// check SPI presence:\n// unzip -p plugins/doris/connector-doris-*.jar META-INF/services/org.apache.seatunnel.api.table.factory.CatalogFactory | grep -i doris","typeGuard":null,"tryCatchPattern":"try {\n    SaveModeHandler h = sink.getSaveModeHandler();\n} catch (DorisConnectorException e) {\n    if (e.getErrorCode() == SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED)\n        log.error(\"Doris catalog factory missing from classpath\");\n}","preventionTips":["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"],"tags":["spi","classpath","doris","save-mode"],"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-14T11:17:12.474Z"}