{"record":{"id":"d6f6a09f28e19e90","repo":"pinpoint-apm/pinpoint","slug":"invalid-namespace-namespace","errorCode":null,"errorMessage":"Invalid namespace : <namespace>","messagePattern":"Invalid namespace : <namespace>","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"commons-hbase/src/main/java/com/navercorp/pinpoint/common/hbase/HbaseTableNameProvider.java","lineNumber":50,"sourceCode":"\n    private static final HbaseTableNameCache CACHE = new HbaseTableNameCache();\n\n    private final String namespace;\n\n    public HbaseTableNameProvider(String namespace) {\n        this(namespace, HbaseNamespaceValidator.INSTANCE);\n    }\n\n    @VisibleForTesting\n    HbaseTableNameProvider(String namespace, NamespaceValidator namespaceValidator) {\n        Objects.requireNonNull(namespaceValidator, \"namespaceValidator\");\n        this.namespace = requireValidation(namespace, namespaceValidator);\n    }\n\n    private String requireValidation(String namespace, NamespaceValidator namespaceValidator) {\n        Assert.hasLength(namespace, \"namespace must not be empty\");\n        if (!namespaceValidator.validate(namespace)) {\n            throw new IllegalArgumentException(\"Invalid namespace : \" + namespace);\n        }\n        return namespace;\n    }\n\n    @Override\n    public TableName getTableName(HbaseTable hBaseTable) {\n        return getTableName(hBaseTable.getName());\n    }\n\n    @Override\n    public TableName getTableName(String tableName) {\n        return CACHE.get(namespace, tableName);\n    }\n\n    @Override\n    public boolean hasDefaultNameSpace() {\n        return true;\n    }","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/commons-hbase/src/main/java/com/navercorp/pinpoint/common/hbase/HbaseTableNameProvider.java#L32-L68","documentation":"HbaseTableNameProvider's constructor validates the HBase namespace string using the supplied NamespaceValidator via requireValidation(). After the empty-check, any namespace whose characters/shape fail the validator throws IllegalArgumentException('Invalid namespace : <namespace>'). HBase namespaces must be valid table-namespace identifiers (e.g. [a-z0-9_-] style, no illegal characters).","triggerScenarios":"Constructing HbaseTableNameProvider with a namespace containing uppercase letters, illegal characters (dots, slashes, spaces), or otherwise failing NamespaceValidator.validate(); loading the namespace from config with an unintended value such as an empty-defaulted placeholder resolving to garbage.","commonSituations":"Config file has hbase.namespace=MyNamespace (uppercase) — HBase namespaces are conventionally lowercase; trailing whitespace or BOM from the config file; user pasted a fully-qualified 'ns:table' string where only the namespace was expected.","solutions":["Use a lowercase namespace matching HBase rules (letters, digits, underscore, hyphen; e.g. 'pinpoint')","Trim the namespace value read from configuration before constructing the provider","If the value came from a placeholder, check for unresolved or wrongly-resolved values (see '${...}' resolution) and set a literal default"],"exampleFix":"// before (config)\nhbase.namespace=Pinpoint\n// after (config)\nhbase.namespace=pinpoint","handlingStrategy":"validation","validationCode":"private static final Pattern NS = Pattern.compile(\"^[a-z0-9_-]+$\");\npublic static void checkNamespace(String ns) {\n    Assert.hasLength(ns, \"namespace must not be empty\");\n    if (!NS.matcher(ns).matches()) throw new IllegalArgumentException(\"Invalid namespace : \" + ns);\n}","typeGuard":null,"tryCatchPattern":"try {\n    HbaseTableNameProvider provider = new HbaseTableNameProvider(namespace, validator);\n} catch (IllegalArgumentException e) {\n    log.error(\"Namespace rejected: {}\", e.getMessage());\n    throw new IllegalArgumentException(\"Fix hbase.namespace in config\", e);\n}","preventionTips":["Use lowercase namespaces (HBase convention): letters, digits, underscore, hyphen only","Trim config values before constructing the provider","Do not pass 'ns:table' strings where only a namespace is expected","Validate the namespace regex before placing it in configuration"],"tags":["hbase","namespace","validation","configuration"],"backgroundTag":"invalid-argument-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}