{"record":{"id":"ccdbf8d385f116b4","repo":"apache/seatunnel","slug":"unknown-schema-change-event-type-canonicalnam","errorCode":null,"errorMessage":"Unknown schema change event type '\" + canonicalName + \"'. Valid names are: \" + validNames()","messagePattern":"Unknown schema change event type '\" \\+ canonicalName \\+ \"'\\. Valid names are: \" \\+ validNames\\(\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/schema/SchemaChangeEventType.java","lineNumber":73,"sourceCode":"        CANONICAL_NAME_TO_EVENT_TYPE = Collections.unmodifiableMap(map);\n    }\n\n    private SchemaChangeEventType() {}\n\n    public static String validNames() {\n        return String.join(\", \", CANONICAL_NAME_TO_EVENT_TYPE.keySet());\n    }\n\n    public static EventType fromCanonicalName(String canonicalName) {\n        if (canonicalName == null) {\n            throw new IllegalArgumentException(\n                    \"Schema change event type name must not be null. Valid names are: \"\n                            + validNames());\n        }\n        String normalized = canonicalName.trim().toLowerCase();\n        EventType eventType = CANONICAL_NAME_TO_EVENT_TYPE.get(normalized);\n        if (eventType == null) {\n            throw new IllegalArgumentException(\n                    \"Unknown schema change event type '\"\n                            + canonicalName\n                            + \"'. Valid names are: \"\n                            + validNames());\n        }\n        return eventType;\n    }\n\n    public static Set<EventType> fromCanonicalNames(Collection<String> canonicalNames) {\n        if (canonicalNames == null || canonicalNames.isEmpty()) {\n            return Collections.emptySet();\n        }\n        return canonicalNames.stream()\n                .map(SchemaChangeEventType::fromCanonicalName)\n                .collect(Collectors.toCollection(LinkedHashSet::new));\n    }\n\n    /** Visible for testing: the supported canonical names. */","sourceCodeStart":55,"sourceCodeEnd":91,"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/schema/SchemaChangeEventType.java#L55-L91","documentation":"SchemaChangeEventType.fromCanonicalName looks up the normalized (trimmed, lowercased) name in CANONICAL_NAME_TO_EVENT_TYPE and throws IllegalArgumentException when the name is not a known canonical schema-change event type. The message echoes the invalid name plus all valid names.","triggerScenarios":"Calling fromCanonicalName (directly or via fromCanonicalNames from SchemaChangeEventFilter) with a string that, after trim/lowercase, has no mapping — e.g. 'addcolumn', 'drop-tables', or a Debezium-specific event name.","commonSituations":"Typos in schema-change.include-types / exclude-types values, using singular/plural variants or Debezium DDL identifiers instead of SeaTunnel canonical names, copy-pasting config from an incompatible version.","solutions":["Use exactly the canonical names listed in the error message's valid names (e.g. alter-table, add-column, drop-column, rename-column)","Trim whitespace and keep comma-separated entries individually valid","Check docs/en and docs/zh for the canonical schema-change event type list for your SeaTunnel version","Lowercasing is automatic, but spelling must match exactly"],"exampleFix":"// before\n\"schema-change.exclude-types\" = [\"DROP COLUMNS\"]\n// after\n\"schema-change.exclude-types\" = [\"drop-column\"]","handlingStrategy":"validation","validationCode":"// validate names before writing them into config\nString normalized = name.trim().toLowerCase();\nif (!SchemaChangeEventType.CANONICAL_NAME_TO_EVENT_TYPE.containsKey(normalized)) {\n    throw new IllegalArgumentException(\"Unknown type '\" + name + \"'. Valid: \" + SchemaChangeEventType.validNames());\n}","typeGuard":null,"tryCatchPattern":"try {\n    EventType t = SchemaChangeEventType.fromCanonicalName(name);\n} catch (IllegalArgumentException e) {\n    // echo validNames() to the operator and abort config load\n}","preventionTips":["Use exact canonical spellings (e.g. alter-table, add-column)","Do not paste Debezium DDL identifiers into SeaTunnel schema-change options","Keep a shared constants list of valid names in config tooling"],"tags":["cdc","config-validation","enum","schema-change"],"backgroundTag":"invalid-enum-value","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"}