{"record":{"id":"987e80882970c02d","repo":"apache/iceberg","slug":"failed-to-create-output-stream-for-location-987e80","errorCode":null,"errorMessage":"Failed to create output stream for location: ","messagePattern":"Failed to create output stream for location: ","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSOutputFile.java","lineNumber":61,"sourceCode":"   * at the time of invocation.\n   *\n   * @return output stream\n   */\n  @Override\n  public PositionOutputStream create() {\n    if (!exists()) {\n      return createOrOverwrite();\n    } else {\n      throw new AlreadyExistsException(\"Location already exists: %s\", location());\n    }\n  }\n\n  @Override\n  public PositionOutputStream createOrOverwrite() {\n    try {\n      return new ADLSOutputStream(fileClient(), azureProperties(), metrics());\n    } catch (IOException e) {\n      throw new UncheckedIOException(\n          \"Failed to create output stream for location: \" + location(), e);\n    }\n  }\n\n  @Override\n  public InputFile toInputFile() {\n    return new ADLSInputFile(location(), fileClient(), azureProperties(), metrics());\n  }\n}\n","sourceCodeStart":43,"sourceCodeEnd":71,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSOutputFile.java#L43-L71","documentation":"createOrOverwrite() wraps any IOException raised while constructing ADLSOutputStream (which opens the blob for writing) into an UncheckedIOException naming the location. This indicates the output stream could not be opened for the ADLS path.","triggerScenarios":"new ADLSOutputStream(fileClient(), ...) throws IOException during blob open — storage account/container unreachable, invalid path, or Azure SDK open failure.","commonSituations":"Wrong storage account or container name in table location; network/ DNS problems reaching the ADLS endpoint; nonexistent filesystem/container; storage account misconfigured (e.g. firewall blocking access).","solutions":["Inspect the wrapped IOException cause for the underlying Azure error and fix it.","Verify the storage account name, container (filesystem), and path in the location are valid.","Check network access to the ADLS endpoint (VNet/firewall rules, private endpoints, DNS).","Verify the container exists and credentials can write to it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { out = outputFile.createOrOverwrite(); } catch (UncheckedIOException e) { log.error(\"Could not open output stream for {}: {}\", location, e.getCause()); throw e; }","preventionTips":["Verify storage account, container, and path configuration before writes.","Ensure network/VNet/firewall rules allow egress to the ADLS endpoint.","Confirm write permissions on the container with a startup connectivity check."],"tags":["azure","adls","io","write"],"backgroundTag":"file-write-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}