{"record":{"id":"f1d3bb0246e6fa41","repo":"apache/iceberg","slug":"location-does-not-exist-s-f1d3bb","errorCode":null,"errorMessage":"Location does not exist: %s","messagePattern":"Location does not exist: (.+?)","errorType":"exception","errorClass":"NotFoundException","httpStatus":null,"severity":"error","filePath":"azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSInputStream.java","lineNumber":241,"sourceCode":"    if (stream != null) {\n      stream.close();\n    }\n  }\n\n  @SuppressWarnings({\"checkstyle:NoFinalizer\", \"Finalize\", \"deprecation\"})\n  @Override\n  protected void finalize() throws Throwable {\n    super.finalize();\n    if (!closed) {\n      close(); // releasing resources is more important than printing the warning\n      String trace = Joiner.on(\"\\n\\t\").join(Arrays.copyOfRange(createStack, 1, createStack.length));\n      LOG.warn(\"Unclosed input stream created by:\\n\\t{}\", trace);\n    }\n  }\n\n  private static void throwNotFoundIfNotPresent(Throwable throwable, String location) {\n    if (isFileNotFoundException(throwable)) {\n      throw new NotFoundException(throwable, \"Location does not exist: %s\", location);\n    }\n  }\n\n  private static boolean isFileNotFoundException(Throwable exception) {\n    if (exception instanceof BlobStorageException blobStorageException) {\n      return BlobErrorCode.BLOB_NOT_FOUND.equals(blobStorageException.getErrorCode());\n    }\n    if (exception instanceof DataLakeStorageException dataLakeStorageException) {\n      return \"PathNotFound\".equals(dataLakeStorageException.getErrorCode());\n    }\n    return false;\n  }\n}\n","sourceCodeStart":223,"sourceCodeEnd":255,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSInputStream.java#L223-L255","documentation":"When opening a range read on ADLS Gen2, an underlying BlobStorageException with BLOB_NOT_FOUND error code is converted into Iceberg's NotFoundException with the location in the message. This signals the file at the requested location does not exist in the storage account.","triggerScenarios":"ADLSInputStream.openRange encounters a PathNotFound/BlobNotFound error from the Azure SDK when reading the file; e.g. the file was deleted between planning and reading, or the path is wrong.","commonSituations":"Concurrent table compaction/expiry deleting the data file before a task reads it; mistyped storage path in table location; missing container; reading an orphaned file path.","solutions":["Verify the full ADLS location (account/container/path) exists and is spelled correctly.","Re-plan the scan: the file was likely deleted by concurrent maintenance; refresh table metadata and retry.","Check container name and filesystem existence in the storage account.","Confirm credentials allow listing/reading so the real error is not masked (permissions usually yield a different code, but verify)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { readData(); } catch (NotFoundException e) { log.warn(\"File {} was deleted concurrently, re-planning scan\", e.getMessage()); refreshTableMetadata(); retryRead(); }","preventionTips":["Avoid running compaction/expiration concurrently with active reads, or use snapshot expiration retention windows.","Validate table location paths and container names in configuration.","Use retry with re-planning for long-running read jobs against actively maintained tables."],"tags":["azure","adls","not-found","io"],"backgroundTag":"file-not-found","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"}