{"record":{"id":"3e213ca4173fd9da","repo":"alibaba/canal","slug":"dbmapping-table-3e213c","errorCode":null,"errorMessage":"dbMapping.table","messagePattern":"dbMapping\\.table","errorType":"validation","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"client-adapter/tablestore/src/main/java/com/alibaba/otter/canal/client/adapter/tablestore/config/MappingConfig.java","lineNumber":101,"sourceCode":"\n    public void setUpdateChangeColumns(Boolean updateChangeColumns) {\n        this.updateChangeColumns = updateChangeColumns;\n    }\n\n    public Integer getThreads() {\n        return threads;\n    }\n\n    public void setThreads(Integer threads) {\n        this.threads = threads;\n    }\n\n    public void validate() {\n        if (dbMapping.database == null || dbMapping.database.isEmpty()) {\n            throw new NullPointerException(\"dbMapping.database\");\n        }\n        if (dbMapping.table == null || dbMapping.table.isEmpty()) {\n            throw new NullPointerException(\"dbMapping.table\");\n        }\n        if (dbMapping.targetTable == null || dbMapping.targetTable.isEmpty()) {\n            throw new NullPointerException(\"dbMapping.targetTable\");\n        }\n    }\n\n\n\n\n    public static class ColumnItem {\n        private String targetColumn;\n        private String  column;\n        private TablestoreFieldType type;\n\n        public String getColumn() {\n            return column;\n        }\n","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/tablestore/src/main/java/com/alibaba/otter/canal/client/adapter/tablestore/config/MappingConfig.java#L83-L119","documentation":"Thrown by MappingConfig.validate() when dbMapping.table is null or empty. This identifies the source table name in the source database that canal should read binlog events for. It is the second check in validate() — thrown only after database passes validation.","triggerScenarios":"Loading a tablestore mapping config YAML where the dbMapping.table field is absent, null, or an empty string.","commonSituations":"YAML file missing the `table:` line under dbMapping; field was commented out; indentation issue; the config was generated from a template that did not fill in the source table name.","solutions":["Add a non-empty `table` value (the source MySQL/database table name) under dbMapping.","Verify the YAML structure and indentation."],"exampleFix":"// before\ndbMapping:\n  database: mydb\n  targetTable: ots_users\n\n// after\ndbMapping:\n  database: mydb\n  table: users\n  targetTable: ots_users","handlingStrategy":"validation","validationCode":"// Check dbMapping.table before calling validate()\nif (config.getDbMapping() == null\n    || config.getDbMapping().getTable() == null\n    || config.getDbMapping().getTable().isEmpty()) {\n    throw new IllegalArgumentException(\"dbMapping.table is required and must not be empty\");\n}","typeGuard":"null","tryCatchPattern":"try {\n    config.validate();\n} catch (NullPointerException e) {\n    if (\"dbMapping.table\".equals(e.getMessage())) {\n        logger.error(\"Missing required field: dbMapping.table\");\n    }\n    throw e;\n}","preventionTips":["Always include a non-empty `table` (source table name) under dbMapping.","Validate YAML structure and required fields in CI.","Use config templates that pre-fill required field placeholders."],"tags":["tablestore-adapter","config-validation","required-field","config-error"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}