{"record":{"id":"37fd455e581bf446","repo":"apache/hadoop","slug":"invalid-unsupported-encoding-option-specified","errorCode":null,"errorMessage":"Invalid/unsupported encoding option specified: ","messagePattern":"Invalid/unsupported encoding option specified: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java","lineNumber":78,"sourceCode":"      \"Valid encodings are \\\"text\\\", \\\"hex\\\", and \\\"base64\\\". \" +\n      \"Values encoded as text strings are enclosed in double quotes (\\\"),\" +\n      \" and values encoded as hexadecimal and base64 are prefixed with \" +\n      \"0x and 0s, respectively.\\n\" +\n      \"<path>: The file or directory.\\n\";\n\n    private String name = null;\n    private boolean dump = false;\n    private XAttrCodec encoding = XAttrCodec.TEXT;\n\n    @Override\n    protected void processOptions(LinkedList<String> args) throws IOException {\n      name = StringUtils.popOptionWithArgument(\"-n\", args);\n      String en = StringUtils.popOptionWithArgument(\"-e\", args);\n      if (en != null) {\n        try {\n          encoding = XAttrCodec.valueOf(StringUtils.toUpperCase(en));\n        } catch (IllegalArgumentException e) {\n          throw new IllegalArgumentException(\n              \"Invalid/unsupported encoding option specified: \" + en);\n        }\n        Preconditions.checkArgument(encoding != null,\n            \"Invalid/unsupported encoding option specified: \" + en);\n      }\n\n      boolean r = StringUtils.popOption(\"-R\", args);\n      setRecursive(r);\n      dump = StringUtils.popOption(\"-d\", args);\n\n      if (!dump && name == null) {\n        throw new HadoopIllegalArgumentException(\n            \"Must specify '-n name' or '-d' option.\");\n      }\n\n      if (args.isEmpty()) {\n        throw new HadoopIllegalArgumentException(\"<path> is missing.\");\n      }","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java#L60-L96","documentation":"Error \"Invalid/unsupported encoding option specified: \" thrown in apache/hadoop.","triggerScenarios":"Thrown by getfattr/setfattr shell commands when the -e encoding option is not one of the supported values (text, hex, base64).","commonSituations":"See trigger scenarios.","solutions":["Use a supported -e encoding option: 'text', 'hex', or 'base64'.","Fix the encoding option passed to setfattr/getfattr."],"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"}