{"record":{"id":"796c86f73b4f42c8","repo":"apache/seatunnel","slug":"schema-change-event-type-name-must-not-be-null-va","errorCode":null,"errorMessage":"Schema change event type name must not be null. Valid names are: \" + validNames()","messagePattern":"Schema change event type name must not be null\\. 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":66,"sourceCode":"        map.put(\"update.columns\", EventType.SCHEMA_CHANGE_UPDATE_COLUMNS);\n        // NOTE: rename.table (SCHEMA_CHANGE_RENAME_TABLE) is intentionally NOT exposed yet. CDC has\n        // no end-to-end handling for table renames: the DDL is never parsed into an\n        // AlterTableNameEvent, the schema handlers treat that event as a no-op, and no sink applies\n        // it. Exposing it as a filterable name would advertise a capability that does not exist.\n        // It should be added back only once table-rename is implemented end-to-end (see the\n        // rename-table design follow-up).\n        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();","sourceCodeStart":48,"sourceCodeEnd":84,"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#L48-L84","documentation":"SchemaChangeEventType.fromCanonicalName converts a canonical schema-change event type string into its EventType enum. It throws IllegalArgumentException when the passed name is null, embedding the list of valid canonical names so callers know what is accepted.","triggerScenarios":"Calling fromCanonicalName(null), typically when fromCanonicalNames processes a list option containing a null element (e.g. a config option resolved to null inside the include/exclude types list).","commonSituations":"A HOCON/programmatic config where an entry of schema-change.include-types was left empty or a null slipped into the parsed list; plugin code passing an unset variable as the event type name.","solutions":["Inspect the include/exclude types config and remove empty/null entries","Ensure the option is a list of non-empty strings, e.g. [\"add-column\"] rather than [null]","If constructing programmatically, null-check values before calling fromCanonicalName"],"exampleFix":"// before\n\"schema-change.include-types\" = [null, \"add-column\"]\n// after\n\"schema-change.include-types\" = [\"add-column\"]","handlingStrategy":"type-guard","validationCode":"// check each configured value before parsing\nif (name == null || name.trim().isEmpty()) throw new IllegalArgumentException(\"Empty schema-change event type entry\");","typeGuard":null,"tryCatchPattern":"try {\n    EventType t = SchemaChangeEventType.fromCanonicalName(name);\n} catch (IllegalArgumentException e) {\n    // name was null/unknown; log valid names and skip or fail fast\n}","preventionTips":["Never put null/empty entries into include/exclude type lists","Null-check values when building option lists programmatically","Parse configs through fromCanonicalNames to get all errors at once"],"tags":["cdc","null-argument","enum","schema-change"],"backgroundTag":"null-argument","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"}