{"record":{"id":"eba77cf981620515","repo":"apache/druid","slug":"uri-parse-failed","errorCode":null,"errorMessage":"URI parse failed","messagePattern":"URI parse failed","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java","lineNumber":178,"sourceCode":"      throw new IAE(\n          \"An external HTTP table with a URI must also provide the corresponding columns\"\n      );\n    }\n    if (hasTemplate) {\n\n      // Verify the template\n      templateMatcher(uriTemplate);\n\n      // Patch in a dummy URI so that validation of the rest of the fields\n      // will pass.\n      try {\n        sourceMap.put(\n            URIS_FIELD,\n            Collections.singletonList(new URI(\"https://bogus.com/file\"))\n        );\n      }\n      catch (Exception e) {\n        throw new ISE(e, \"URI parse failed\");\n      }\n    }\n    super.validate(table);\n  }\n\n  @Override\n  protected void auditInputSource(Map<String, Object> jsonMap)\n  {\n    // A partial table may not include the URI parameter. For example, we might\n    // define an HTTP input source \"with URIs to be named later.\" Even though the\n    // input source is partial, we still want to validate the other parameters.\n    // The HttpInputSource will fail if the URIs is not set. So, we have to make\n    // up a fake one just so we can validate the other fields by asking the\n    // input source to deserialize itself from the jsonMap.\n    jsonMap.putIfAbsent(URIS_PARAMETER, \"http://bogus.com\");\n  }\n\n  private Matcher templateMatcher(String uriTemplate)","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java#L160-L196","documentation":"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.","triggerScenarios":"During validate of a template-based table, constructing new URI(\"https://bogus.com/file\") throws (checked exception) and gets wrapped as ISE.","commonSituations":"Rare in practice; could occur in a broken runtime where the URI class or handler resolution misbehaves; otherwise essentially unreachable dead-path protection.","solutions":["Inspect the wrapped cause exception for the actual URI syntax failure","Verify the JVM's URL stream handler factory is not corrupted by third-party code","Report as a bug if reproducible; this constant URI should always parse"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { validate(table); } catch (ISE e) { if (\"URI parse failed\".equals(e.getMessage())) { log.error(\"environment bug\", e); } else { throw e; } }","preventionTips":["Treat as a bug; report upstream","Check for JVM URL handler corruption"],"tags":["internal","uri","invariant"],"backgroundTag":"internal-invariant-violation","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}