{"record":{"id":"d1713edb3949b215","repo":"apache/hadoop","slug":"uri-is-an-invalid-har-uri-since-not-found","errorCode":null,"errorMessage":"URI: {} is an invalid Har URI since '-' not found.  Expecting har://<scheme>-<host>/<path>.","messagePattern":"URI: (.+?) is an invalid Har URI since '-' not found\\.  Expecting har://<scheme>-<host>/<path>\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java","lineNumber":232,"sourceCode":"   * decode the raw URI to get the underlying URI\n   * @param rawURI raw Har URI\n   * @return filtered URI of the underlying fileSystem\n   */\n  private URI decodeHarURI(URI rawURI, Configuration conf) throws IOException {\n    String tmpAuth = rawURI.getAuthority();\n    //we are using the default file\n    //system in the config \n    //so create a underlying uri and \n    //return it\n    if (tmpAuth == null) {\n      //create a path \n      return FileSystem.getDefaultUri(conf);\n    }\n    String authority = rawURI.getAuthority();\n\n    int i = authority.indexOf('-');\n    if (i < 0) {\n      throw new IOException(\"URI: \" + rawURI\n          + \" is an invalid Har URI since '-' not found.\"\n          + \"  Expecting har://<scheme>-<host>/<path>.\");\n    }\n \n    if (rawURI.getQuery() != null) {\n      // query component not allowed\n      throw new IOException(\"query component in Path not supported  \" + rawURI);\n    }\n \n    URI tmp;\n    try {\n      // convert <scheme>-<host> to <scheme>://<host>\n      URI baseUri = new URI(authority.replaceFirst(\"-\", \"://\"));\n \n      tmp = new URI(baseUri.getScheme(), baseUri.getAuthority(),\n            rawURI.getPath(), rawURI.getQuery(), rawURI.getFragment());\n    } catch (URISyntaxException e) {\n      throw new IOException(\"URI: \" + rawURI","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java#L214-L250","documentation":"Error \"URI: {} is an invalid Har URI since '-' not found.  Expecting har://<scheme>-<host>/<path>.\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Format the URI as har://<scheme>-<host>/<path>, including the '-' separator.","Example: har://hdfs-nn.example.com:8020/archive.har/file."],"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"}