{"record":{"id":"e8b51402a137dd7c","repo":"alibaba/canal","slug":"hbasemapping-hbasetable","errorCode":null,"errorMessage":"hbaseMapping.hbaseTable","messagePattern":"hbaseMapping\\.hbaseTable","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":77,"sourceCode":"    }\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;\n\n        return hbaseMapping != null ? hbaseMapping.equals(config.hbaseMapping) : config.hbaseMapping == null;\n    }","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/config/MappingConfig.java#L59-L95","documentation":"MappingConfig.validate() requires HbaseMapping.hbaseTable (the destination HBase table name) to be non-null and non-empty. A blank destination table fails validation.","triggerScenarios":"HBase mapping YAML missing 'hbaseMapping.hbaseTable' or setting it empty; validate() invoked at config load.","commonSituations":"Mapping YAML where the HBase target table name was deleted or never filled; typo such as 'hbaseTbl'.","solutions":["Set 'hbaseTable: <target_hbase_table>' under hbaseMapping.","Ensure the HBase table exists (or set autoCreateTable:true) on the destination cluster.","Verify YAML key spelling is exactly 'hbaseTable'.","Lint the YAML."],"exampleFix":"# before\nhbaseMapping:\n  database: mydb\n  table: t_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().getHbaseTable() == null\n        || cfg.getHbaseMapping().getHbaseTable().isEmpty()) {\n    throw new IllegalArgumentException(\"hbaseMapping.hbaseTable is required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    config.validate();\n} catch (NullPointerException e) {\n    if (\"hbaseMapping.hbaseTable\".equals(e.getMessage())) {\n        logger.error(\"Add 'hbaseTable: <target>' under hbaseMapping\");\n    }\n    throw e;\n}","preventionTips":["Always specify the destination HBase table.","Ensure the HBase table exists or autoCreateTable is true.","Use a YAML template/linter."],"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"}