{"record":{"id":"7b070d4659c22329","repo":"apache/seatunnel","slug":"no-debeziumadapter-found-for-connector-class","errorCode":null,"errorMessage":"No DebeziumAdapter found for connector class: \" + connectorClassName + \". Ensure a META-INF/services/\" + DebeziumAdapter.class.getName() + \" registration is present in the connector module.","messagePattern":"No DebeziumAdapter found for connector class: \" \\+ connectorClassName \\+ \"\\. Ensure a META-INF/services/\" \\+ DebeziumAdapter\\.class\\.getName\\(\\) \\+ \" registration is present in the connector module\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/debezium/DebeziumAdapterFactory.java","lineNumber":75,"sourceCode":"     * @param classLoader the class loader used to discover {@link DebeziumAdapter} registrations\n     *     from {@code META-INF/services}\n     * @throws IllegalStateException if no matching adapter is found, or if more than one adapter\n     *     matches\n     */\n    public static DebeziumAdapter getAdapter(String connectorClassName, ClassLoader classLoader) {\n        LOG.info(\"Loading DebeziumAdapter for connector class: {}\", connectorClassName);\n        ServiceLoader<DebeziumAdapter> loader =\n                ServiceLoader.load(DebeziumAdapter.class, classLoader);\n\n        List<DebeziumAdapter> matches = new ArrayList<>();\n        for (DebeziumAdapter adapter : loader) {\n            if (adapter.supports(connectorClassName)) {\n                matches.add(adapter);\n            }\n        }\n\n        if (matches.isEmpty()) {\n            throw new IllegalStateException(\n                    \"No DebeziumAdapter found for connector class: \"\n                            + connectorClassName\n                            + \". Ensure a META-INF/services/\"\n                            + DebeziumAdapter.class.getName()\n                            + \" registration is present in the connector module.\");\n        }\n\n        if (matches.size() > 1) {\n            String providers =\n                    matches.stream()\n                            .map(\n                                    a ->\n                                            a.getClass().getName()\n                                                    + \" (Debezium \"\n                                                    + a.getDebeziumVersion()\n                                                    + \")\")\n                            .collect(Collectors.joining(\", \"));\n            throw new IllegalStateException(","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/debezium/DebeziumAdapterFactory.java#L57-L93","documentation":"DebeziumAdapterFactory discovers DebeziumAdapter implementations via Java SPI (ServiceLoader) and picks one that supports the target Debezium connector class. When no registered adapter supports the connector class name, it throws IllegalStateException instructing the user to add a META-INF/services/<DebeziumAdapter FQCN> registration in the connector module.","triggerScenarios":"Building/sourcing a CDC connector (e.g. a custom database) whose Debezium connector class name is not claimed by any DebeziumAdapter registered under META-INF/services in the deployed plugin jar — or the services file being dropped by shading/assembly config.","commonSituations":"Writing a custom CDC connector and forgetting the SPI registration file; fat-jar shading excluding META-INF/services; using a Debezium connector type unsupported by the installed SeaTunnel version.","solutions":["Create/restore META-INF/services/<DebeziumAdapter FQCN> listing your adapter implementation in the connector module's resources","Verify the SPI file survives packaging (use ServicesResourceTransformer when shading)","Check the connector class name in the message matches the Debezium module you actually use","Upgrade SeaTunnel if support for your database was added in a newer release"],"exampleFix":"// before\nsrc/main/resources/ (no META-INF/services file)\n// after\nsrc/main/resources/META-INF/services/org.apache.seatunnel.connectors.cdc.base.debezium.DebeziumAdapter\ncontaining: org.apache.seatunnel.connectors.cdc.mysql.debezium.MysqlDebeziumAdapter","handlingStrategy":"validation","validationCode":"ServiceLoader<DebeziumAdapter> loader = ServiceLoader.load(DebeziumAdapter.class);\nList<DebeziumAdapter> adapters = new ArrayList<>();\nloader.forEach(adapters::add);\nif (adapters.stream().noneMatch(a -> a.supports(connectorClassName))) {\n    throw new IllegalStateException(\"No DebeziumAdapter for \" + connectorClassName);\n}","typeGuard":null,"tryCatchPattern":"try {\n    DebeziumAdapter adapter = DebeziumAdapterFactory.getAdapter(connectorClassName);\n} catch (IllegalStateException e) {\n    LOG.error(\"SPI registration missing: {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Ship META-INF/services/org.apache.seatunnel.connectors.cdc.base.debezium.DebeziumAdapter in every custom CDC connector","Configure the shade plugin ServicesResourceTransformer so SPI files merge in fat jars","Verify the deployed plugin jar contains the services file before submitting jobs"],"tags":["cdc","spi","service-loader"],"backgroundTag":"missing-dependency","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"}