{"record":{"id":"e41d07b0eddc639f","repo":"apache/hadoop","slug":"scheme-not-defined-in-the-uri-uri","errorCode":null,"errorMessage":"Scheme not defined in the uri: {uri}","messagePattern":"Scheme not defined in the uri: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java","lineNumber":194,"sourceCode":"      throw new UnsupportedFileSystemException(String.format(\n          \"%s=null: %s: %s\",\n          fsImplConf, NO_ABSTRACT_FS_ERROR, uri.getScheme()));\n    }\n    return (AbstractFileSystem) newInstance(clazz, uri, conf);\n  }\n\n  /**\n   * Get the statistics for a particular file system.\n   * \n   * @param uri\n   *          used as key to lookup STATISTICS_TABLE. Only scheme and authority\n   *          part of the uri are used.\n   * @return a statistics object\n   */\n  protected static synchronized Statistics getStatistics(URI uri) {\n    String scheme = uri.getScheme();\n    if (scheme == null) {\n      throw new IllegalArgumentException(\"Scheme not defined in the uri: \"\n          + uri);\n    }\n    URI baseUri = getBaseUri(uri);\n    Statistics result = STATISTICS_TABLE.get(baseUri);\n    if (result == null) {\n      result = new Statistics(scheme);\n      STATISTICS_TABLE.put(baseUri, result);\n    }\n    return result;\n  }\n  \n  private static URI getBaseUri(URI uri) {\n    String scheme = uri.getScheme();\n    String authority = uri.getAuthority();\n    String baseUriString = scheme + \"://\";\n    if (authority != null) {\n      baseUriString = baseUriString + authority;\n    } else {","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java#L176-L212","documentation":"Error \"Scheme not defined in the uri: {uri}\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["Include a scheme in the URI (e.g. hdfs://, viewfs://) so the FileSystem can be selected."],"exampleFix":"Prefix the URI with the filesystem scheme.","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-23T01:17:44.959Z"}