{"record":{"id":"889508fd4544ac3f","repo":"apache/hadoop","slug":"parsing-of-xml-list-response-failed-in-blobclient","errorCode":null,"errorMessage":"Parsing of XML List Response Failed in BlobClient.","messagePattern":"Parsing of XML List Response Failed in BlobClient\\.","errorType":"exception","errorClass":"AbfsDriverException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java","lineNumber":1690,"sourceCode":"   */\n  @Override\n  public ListResponseData parseListPathResults(AbfsHttpOperation result, URI uri)\n      throws AzureBlobFileSystemException {\n    try (InputStream stream = result.getListResultStream()) {\n      try {\n        BlobListResultSchema listResultSchema;\n        final SAXParser saxParser = saxParserThreadLocal.get();\n        saxParser.reset();\n        listResultSchema = new BlobListResultSchema();\n        saxParser.parse(stream,\n            new BlobListXmlParser(listResultSchema, getBaseUrl().toString()));\n        result.setListResultSchema(listResultSchema);\n        LOG.debug(\"ListBlobs listed {} blobs with {} as continuation token\",\n            listResultSchema.paths().size(),\n            listResultSchema.getNextMarker());\n        return filterRenamePendingFiles(listResultSchema, uri);\n      } catch (SAXException | IOException ex) {\n        throw new AbfsDriverException(ERR_BLOB_LIST_PARSING, ex);\n      }\n    } catch (AbfsDriverException ex) {\n      // Throw as it is to avoid multiple wrapping.\n      LOG.error(\"Unable to deserialize list results for Uri {}\", uri != null ? uri.toString(): \"NULL\", ex);\n      throw ex;\n    } catch (Exception ex) {\n      LOG.error(\"Unable to get stream for list results for uri {}\", uri != null ? uri.toString(): \"NULL\", ex);\n      throw new AbfsDriverException(ERR_BLOB_LIST_PARSING, ex);\n    }\n  }\n\n  /**\n   * Parse the XML response body returned by GetBlockList API on Blob Endpoint.\n   * @param stream InputStream contains the response from server.\n   * @return List of blockIds.\n   * @throws IOException if parsing fails.\n   */\n  @Override","sourceCodeStart":1672,"sourceCodeEnd":1708,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java#L1672-L1708","documentation":"While deserializing a ListBlobs XML response on a non-HNS account, a SAXException or IOException from the parser (BlobListXmlParser over a per-thread SAXParser) is wrapped in AbfsDriverException('Parsing of XML List Response Failed in BlobClient.'), itself an AbfsRestOperationException. The original parse failure is chained, and the URI is logged — the XML returned by the service (or mangled in transit) could not be parsed.","triggerScenarios":"fs.listStatus()/listFiles on a blob endpoint where the XML body is malformed or truncated: proxy/interceptor rewriting the response, connection drops mid-body producing IOException from the stream, or response-size limits truncating large listings.","commonSituations":"Corporate proxies or inspection appliances altering Azure responses; flaky links truncating long list responses; extremely large directories exceeding buffer settings; transient service-side serialization glitches.","solutions":["Retry the listing — truncated/transient parse failures usually succeed on a fresh request","If reproducible on one path, list that path directly and inspect the raw response (wire log) for truncation or rewriting","Bypass or correctly configure HTTP proxies/SSL inspection for *.blob.core.windows.net traffic","Reduce listing page pressure (larger maxEntriesInListing) if truncation correlates with page size"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return fs.listStatus(path);\n} catch (AbfsDriverException e) {\n  // XML from ListBlobs failed to parse (cause is SAXException/IOException);\n  // truncated/transient responses usually parse on retry\n  return retryWithBackoff(() -> fs.listStatus(path), 3);\n}","preventionTips":["Exclude Azure Storage endpoints from SSL-inspecting proxies","Retry listings once or twice before escalating parse failures","Capture wire logs when a specific path reproducibly fails to parse"],"tags":["azure","abfs","xml","parsing","list-blobs","blob-endpoint"],"backgroundTag":"xml-parsing-failed","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}