{"record":{"id":"3e355d710fd6df73","repo":"apache/hadoop","slug":"archive-name-not-specified","errorCode":null,"errorMessage":"Archive Name not specified.","messagePattern":"Archive Name not specified\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java","lineNumber":845,"sourceCode":"    try {\n      // Parse CLI options\n      Options options = new Options();\n      options.addOption(ARCHIVE_NAME, true,\n          \"Name of the Archive. This is mandatory option\");\n      options.addOption(PARENT_PATH, true,\n          \"Parent path of sources. This is mandatory option\");\n      options.addOption(REPLICATION, true, \"Replication factor archive files\");\n      options.addOption(HELP, false, \"Show the usage\");\n      Parser parser = new GnuParser();\n      CommandLine commandLine = parser.parse(options, args, true);\n\n      if (commandLine.hasOption(HELP)) {\n        printUsage(options, true);\n        return 0;\n      }\n      if (!commandLine.hasOption(ARCHIVE_NAME)) {\n        printUsage(options, false);\n        throw new IOException(\"Archive Name not specified.\");\n      }\n      String archiveName = commandLine.getOptionValue(ARCHIVE_NAME);\n      if (!checkValidName(archiveName)) {\n        printUsage(options, false);\n        throw new IOException(\"Invalid name for archives. \" + archiveName);\n      }\n      //check to see if relative parent has been provided or not\n      //this is a required parameter. \n      if (!commandLine.hasOption(PARENT_PATH)) {\n        printUsage(options, false);\n        throw new IOException(\"Parent path not specified.\");\n      }\n      Path parentPath = new Path(commandLine.getOptionValue(PARENT_PATH));\n      if (!parentPath.isAbsolute()) {\n        parentPath = parentPath.getFileSystem(getConf()).makeQualified(\n            parentPath);\n      }\n","sourceCodeStart":827,"sourceCodeEnd":863,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java#L827-L863","documentation":"Error \"Archive Name not specified.\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java:845 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -archiveName <name.har> to the hadoop archive command."],"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"}