{"record":{"id":"0133d172e0edcdc2","repo":"apache/hadoop","slug":"xattr-had-no-ns-entry","errorCode":null,"errorMessage":"<xattr> had no <ns> entry.","messagePattern":"<xattr> had no <ns> entry\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java","lineNumber":889,"sourceCode":"      b.addEntries(v);\n    }\n    return b;\n  }\n\n  private INodeSection.XAttrFeatureProto.Builder xattrsXmlToProto(Node xattrs)\n      throws IOException {\n    INodeSection.XAttrFeatureProto.Builder bld =\n        INodeSection.XAttrFeatureProto.newBuilder();\n    while (true) {\n      Node xattr = xattrs.removeChild(INODE_SECTION_XATTR);\n      if (xattr == null) {\n        break;\n      }\n      INodeSection.XAttrCompactProto.Builder b =\n          INodeSection.XAttrCompactProto.newBuilder();\n      String ns = xattr.removeChildStr(INODE_SECTION_NS);\n      if (ns == null) {\n        throw new IOException(\"<xattr> had no <ns> entry.\");\n      }\n      int nsIdx = XAttrProtos.XAttrProto.\n          XAttrNamespaceProto.valueOf(ns).ordinal();\n      String name = xattr.removeChildStr(SECTION_NAME);\n      String valStr = xattr.removeChildStr(INODE_SECTION_VAL);\n      byte[] val = null;\n      if (valStr == null) {\n        String valHex = xattr.removeChildStr(INODE_SECTION_VAL_HEX);\n        if (valHex == null) {\n          throw new IOException(\"<xattr> had no <val> or <valHex> entry.\");\n        }\n        val = new HexBinaryAdapter().unmarshal(valHex);\n      } else {\n        val = valStr.getBytes(StandardCharsets.UTF_8);\n      }\n      b.setValue(ByteString.copyFrom(val));\n\n      // The XAttrCompactProto name field uses a fairly complex format","sourceCodeStart":871,"sourceCodeEnd":907,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L871-L907","documentation":"Error \"<xattr> had no <ns> entry.\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when an <xattr> stanza in the fsimage XML has no <ns> (namespace) entry.","commonSituations":"See trigger scenarios.","solutions":["Add the missing <ns> (namespace) element to the <xattr> stanza in the fsimage XML.","Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}