apache/flink · error · SdkClientException
Failed to sanitize XML document destined for handler {}
Error message
Failed to sanitize XML document destined for handler {} What it means
Error "Failed to sanitize XML document destined for handler {}" thrown in apache/flink.
Source
Thrown at flink-filesystems/flink-s3-fs-base/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java:232
*/
String listingDoc = listingDocBuffer.toString().replaceAll("\r", "
");
sanitizedInputStream = new ByteArrayInputStream(listingDoc.getBytes(UTF8));
} catch (IOException e) {
throw e;
} catch (Throwable t) {
try {
inputStream.close();
} catch (IOException e) {
if (log.isErrorEnabled()) {
log.error(
"Unable to close response InputStream after failure sanitizing XML document",
e);
}
}
throw new SdkClientException(
"Failed to sanitize XML document destined for handler "
+ handler.getClass(),
t);
}
return sanitizedInputStream;
}
}
/**
* Disables certain dangerous features that attempt to automatically fetch DTDs
*
* <p>See <a
* href="https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet#XMLReader">OWASP
* XXE Cheat Sheet</a>
*
* @param reader the reader to disable the features on
* @throws SAXNotRecognizedException
* @throws SAXNotSupportedExceptionView on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Failed to sanitize XML document destined for handler the reported value
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Failed to sanitize XML document destined for handler the reported value") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Failed to sanitize XML document destined for handler the reported value.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Failed to sanitize XML document destined for handler the reported value.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/16282f487d326d8e.
Report an issue: GitHub.