{"record":{"id":"1411f462bd3c9e97","repo":"alibaba/canal","slug":"hbasemapping-table","errorCode":null,"errorMessage":"hbaseMapping.table","messagePattern":"hbaseMapping\\.table","errorType":"validation","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/config/MappingConfig.java","lineNumber":74,"sourceCode":"\n    public HbaseMapping getHbaseMapping() {\n        return hbaseMapping;\n    }\n\n    public void setHbaseMapping(HbaseMapping hbaseMapping) {\n        this.hbaseMapping = hbaseMapping;\n    }\n\n    public AdapterMapping getMapping() {\n        return hbaseMapping;\n    }\n\n    public void validate() {\n        if (hbaseMapping.database == null || hbaseMapping.database.isEmpty()) {\n            throw new NullPointerException(\"hbaseMapping.database\");\n        }\n        if (hbaseMapping.table == null || hbaseMapping.table.isEmpty()) {\n            throw new NullPointerException(\"hbaseMapping.table\");\n        }\n        if (hbaseMapping.hbaseTable == null || hbaseMapping.hbaseTable.isEmpty()) {\n            throw new NullPointerException(\"hbaseMapping.hbaseTable\");\n        }\n        if (hbaseMapping.mode == null) {\n            throw new NullPointerException(\"hbaseMapping.mode\");\n        }\n        if (hbaseMapping.rowKey != null && hbaseMapping.rowKeyColumn != null) {\n            throw new RuntimeException(\"已配置了复合主键作为RowKey，无需再指定RowKey列\");\n        }\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (o == null || getClass() != o.getClass()) return false;\n\n        MappingConfig config = (MappingConfig) o;","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/config/MappingConfig.java#L56-L92","documentation":"MappingConfig.validate() requires HbaseMapping.table (the source MySQL table name) to be non-null and non-empty. Missing or blank table throws NullPointerException at validate() time.","triggerScenarios":"HBase mapping YAML omitting 'hbaseMapping.table' or setting it empty; loaded via MappingConfigLoader during adapter init.","commonSituations":"Incomplete mapping YAML after renaming the source table; indentation slip so 'table' is not under hbaseMapping.","solutions":["Set 'table: <source_table_name>' under hbaseMapping.","Confirm the value matches the actual MySQL table being synced.","Fix YAML indentation so 'table' is a child of hbaseMapping.","Lint the YAML before deploy."],"exampleFix":"# before\nhbaseMapping:\n  database: mydb\n  hbaseTable: user\n\n# after\nhbaseMapping:\n  database: mydb\n  table: t_user\n  hbaseTable: user","handlingStrategy":"validation","validationCode":"MappingConfig cfg = ...;\nif (cfg.getHbaseMapping() == null\n        || cfg.getHbaseMapping().getTable() == null\n        || cfg.getHbaseMapping().getTable().isEmpty()) {\n    throw new IllegalArgumentException(\"hbaseMapping.table is required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    config.validate();\n} catch (NullPointerException e) {\n    if (\"hbaseMapping.table\".equals(e.getMessage())) {\n        logger.error(\"Add 'table: <source_table>' under hbaseMapping\");\n    }\n    throw e;\n}","preventionTips":["Always specify the source table name.","Verify the table name matches the MySQL source table.","Lint HBase mapping YAMLs in CI."],"tags":["hbase-adapter","config","validation","yaml"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}