apache/druid · error · ISE

URI parse failed

Error message

URI parse failed

What it means

Internal IllegalStateException wrapped around a URI parse failure in HttpInputSourceDefn.validate. When a template-based HTTP table lacks explicit URIs, validate inserts a placeholder URI (https://bogus.com/file) to satisfy the base validation; if even that constant fails to parse as a URI, this error is thrown. In practice this signals a JVM/environment problem, not user input.

Solutions

  1. Inspect the wrapped cause exception for the actual URI syntax failure
  2. Verify the JVM's URL stream handler factory is not corrupted by third-party code
  3. Report as a bug if reproducible; this constant URI should always parse
Defensive patterns

Strategy: try-catch

Try / catch

try { validate(table); } catch (ISE e) { if ("URI parse failed".equals(e.getMessage())) { log.error("environment bug", e); } else { throw e; } }

Prevention

When it happens

Trigger: During validate of a template-based table, constructing new URI("https://bogus.com/file") throws (checked exception) and gets wrapped as ISE.

Common situations: Rare in practice; could occur in a broken runtime where the URI class or handler resolution misbehaves; otherwise essentially unreachable dead-path protection.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/eba77cf981620515. Report an issue: GitHub.

Appendix: source

Thrown at server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java:178

      throw new IAE(
          "An external HTTP table with a URI must also provide the corresponding columns"
      );
    }
    if (hasTemplate) {

      // Verify the template
      templateMatcher(uriTemplate);

      // Patch in a dummy URI so that validation of the rest of the fields
      // will pass.
      try {
        sourceMap.put(
            URIS_FIELD,
            Collections.singletonList(new URI("https://bogus.com/file"))
        );
      }
      catch (Exception e) {
        throw new ISE(e, "URI parse failed");
      }
    }
    super.validate(table);
  }

  @Override
  protected void auditInputSource(Map<String, Object> jsonMap)
  {
    // A partial table may not include the URI parameter. For example, we might
    // define an HTTP input source "with URIs to be named later." Even though the
    // input source is partial, we still want to validate the other parameters.
    // The HttpInputSource will fail if the URIs is not set. So, we have to make
    // up a fake one just so we can validate the other fields by asking the
    // input source to deserialize itself from the jsonMap.
    jsonMap.putIfAbsent(URIS_PARAMETER, "http://bogus.com");
  }

  private Matcher templateMatcher(String uriTemplate)

View on GitHub (pinned to 9b90983fd2)