apache/hadoop · error · RuntimeException
Check parser configuration
Error message
Check parser configuration
What it means
A RuntimeException from the same per-thread SAXParser initializer: SAXParserFactory.newSAXParser() threw ParserConfigurationException. The configured parser factory exists but rejects the requested configuration (namespace-aware), so no parser can be built for XML parsing of blob-endpoint responses.
Source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:1987
}
} catch (UnsupportedEncodingException e) {
throw new InvalidAbfsRestOperationException(e);
}
metadataRequestHeaders.add(new AbfsHttpHeader(key, value));
}
}
return metadataRequestHeaders;
}
private final ThreadLocal<SAXParser> saxParserThreadLocal = ThreadLocal.withInitial(() -> {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
try {
return factory.newSAXParser();
} catch (SAXException e) {
throw new RuntimeException("Unable to create SAXParser", e);
} catch (ParserConfigurationException e) {
throw new RuntimeException("Check parser configuration", e);
}
});
/**
* This will filter out all the rename pending json files in listing output.
* @param listResultSchema List of entries returned by Blob Endpoint.
* @param uri URI to be used for path conversion.
* @return List of entries after removing duplicates.
* @throws IOException if path conversion fails.
*/
@VisibleForTesting
public ListResponseData filterRenamePendingFiles(
BlobListResultSchema listResultSchema, URI uri) throws IOException {
List<VersionedFileStatus> fileStatuses = new ArrayList<>();
Map<Path, Integer> renamePendingJsonPaths = new HashMap<>();
for (BlobListResultEntrySchema entry : listResultSchema.paths()) {
if (isRenamePendingJsonPathEntry(entry)) {View on GitHub (pinned to 2add963021)
Solutions
- Check for and remove -Djavax.xml.parsers.SAXParserFactory and -Dorg.xml.sax.driver overrides or point them at a full-featured implementation.
- Ensure the classpath contains one complete parser implementation (e.g. the JDK built-in or modern Xerces) and no partial duplicates.
- Validate at startup that SAXParserFactory.newInstance().newSAXParser() succeeds with factory.setNamespaceAware(true).
- If shading, keep the original JAXP service descriptors intact.
Example fix
// before: JVM launched with // -Djavax.xml.parsers.SAXParserFactory=com.example.MinimalSAXFactory // after: launch without the override, or point at a namespace-aware implementation SAXParserFactory f = SAXParserFactory.newInstance(); f.setNamespaceAware(true); f.newSAXParser(); // must not throw before Azure work starts
Defensive patterns
Strategy: try-catch
Validate before calling
SAXParserFactory f = SAXParserFactory.newInstance();
f.setNamespaceAware(true);
try { f.newSAXParser(); }
catch (Exception e) { throw new IllegalStateException("JAXP parser rejects namespace-aware config", e); } Try / catch
try {
return blobClient.listContainers(prefix, token, tracingContext);
} catch (RuntimeException ex) {
if (ex.getCause() instanceof ParserConfigurationException) {
// JAXP factory selection is broken: audit system properties and classpath
}
throw ex;
} Prevention
- Avoid JAXP factory system-property overrides on nodes running Hadoop Azure.
- Pin a known-good parser version in the distribution and fail builds that introduce a second one.
- Self-test namespace-aware parser creation during cluster validation.
When it happens
Trigger: First blob-endpoint XML-listing call on a thread where the resolved SAXParserFactory does not support the namespace-aware setting — a custom or partial parser implementation chosen via system property, service-loader entry, or classpath conflict.
Common situations: A JAXP system property or services file selects a parser that lacks namespace support; minimal/partial XML parser jars shipped by a framework; embedding Hadoop in a container that already pins a limited parser.
Related errors
- Unable to create SAXParser
- Parsing of XML List Response Failed in BlobClient.
- expected <EDITS/>
- SAXTransformer error: {}
- SAX error: {}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7c8606149c6df38f.
Report an issue: GitHub.