{"record":{"id":"49c9ffb205ee977d","repo":"apache/hadoop","slug":"invalid-path-for-the-har-filesystem-no-index-file","errorCode":null,"errorMessage":"Invalid path for the Har Filesystem. No index file in {}","messagePattern":"Invalid path for the Har Filesystem\\. No index file in (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java","lineNumber":154,"sourceCode":"    // truly a har filesystem\n    Path harPath = archivePath(\n      new Path(name.getScheme(), name.getAuthority(), name.getPath()));\n    if (harPath == null) { \n      throw new IOException(\"Invalid path for the Har Filesystem. \" + \n                           name.toString());\n    }\n    if (fs == null) {\n      fs = FileSystem.get(underLyingURI, conf);\n    }\n    uri = harPath.toUri();\n    archivePath = new Path(uri.getPath());\n    harAuth = getHarAuth(underLyingURI);\n    //check for the underlying fs containing\n    // the index file\n    Path masterIndexPath = new Path(archivePath, \"_masterindex\");\n    Path archiveIndexPath = new Path(archivePath, \"_index\");\n    if (!fs.exists(masterIndexPath) || !fs.exists(archiveIndexPath)) {\n      throw new IOException(\"Invalid path for the Har Filesystem. \" +\n          \"No index file in \" + harPath);\n    }\n\n    metadata = harMetaCache.get(uri);\n    if (metadata != null) {\n      FileStatus mStat = fs.getFileStatus(masterIndexPath);\n      FileStatus aStat = fs.getFileStatus(archiveIndexPath);\n      if (mStat.getModificationTime() != metadata.getMasterIndexTimestamp() ||\n          aStat.getModificationTime() != metadata.getArchiveIndexTimestamp()) {\n        // the archive has been overwritten since we last read it\n        // remove the entry from the meta data cache\n        metadata = null;\n        harMetaCache.remove(uri);\n      }\n    }\n    if (metadata == null) {\n      metadata = new HarMetaData(fs, masterIndexPath, archiveIndexPath);\n      metadata.parseMetaData();","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java#L136-L172","documentation":"Error \"Invalid path for the Har Filesystem. No index file in {}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the har:// URI at the archive root containing the _index file.","Re-create the archive if the index files are missing or deleted."],"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"}