{"record":{"id":"90d26cc218016099","repo":"apache/hadoop","slug":"uri-without-scheme-uri","errorCode":null,"errorMessage":"Uri without scheme: {uri}","messagePattern":"Uri without scheme: (.+?)","errorType":"validation","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java","lineNumber":294,"sourceCode":"   * @throws URISyntaxException <code>uri</code> has syntax error\n   */\n  public AbstractFileSystem(final URI uri, final String supportedScheme,\n      final boolean authorityNeeded, final int defaultPort)\n      throws URISyntaxException {\n    myUri = getUri(uri, supportedScheme, authorityNeeded, defaultPort);\n    statistics = getStatistics(uri); \n  }\n\n  /**\n   * Check that the Uri's scheme matches.\n   *\n   * @param uri name URI of the FS.\n   * @param supportedScheme supported scheme.\n   */\n  public void checkScheme(URI uri, String supportedScheme) {\n    String scheme = uri.getScheme();\n    if (scheme == null) {\n      throw new HadoopIllegalArgumentException(\"Uri without scheme: \" + uri);\n    }\n    if (!scheme.equals(supportedScheme)) {\n      throw new HadoopIllegalArgumentException(\"Uri scheme \" + uri\n          + \" does not match the scheme \" + supportedScheme);\n    }\n  }\n\n  /**\n   * Get the URI for the file system based on the given URI. The path, query\n   * part of the given URI is stripped out and default file system port is used\n   * to form the URI.\n   * \n   * @param uri FileSystem URI.\n   * @param authorityNeeded if true authority cannot be null in the URI. If\n   *          false authority must be null.\n   * @param defaultPort default port to use if port is not specified in the URI.\n   * \n   * @return URI of the file system","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java#L276-L312","documentation":"Error \"Uri without scheme: {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":["Provide a fully-qualified URI including its scheme."],"exampleFix":"Use viewfs://clusterX/path.","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"}