apache/druid · error · IllegalStateException
Got an exception while parsing file
Error message
Got an exception while parsing file [%s]
What it means
WhiteListBasedConverter.readMap failed while reading/parsing the whitelist map file that maps Graphite event paths to allowed dimensions. The exception wraps whatever I/O or JSON parse error occurred while loading either the configured mapPath file or the built-in defaultWhiteListMap.json resource — e.g. file missing, unreadable, or invalid JSON.
Solutions
- Check the underlying wrapped exception for the real cause (FileNotFoundException, JsonParseException, etc.).
- Verify the filePath configured for the whiteList converter exists and is readable by the Druid process.
- Validate the whitelist JSON file is well-formed (e.g. with jq or a JSON linter).
- If using the default whitelist, ensure the defaultWhiteListMap.json resource is present on the classpath (extension jar intact).
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java:291 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/15d9669a927f72bb.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java:291
private ImmutableSortedMap<String, ImmutableSet<String>> readMap(final String mapPath)
{
String fileContent;
String actualPath = mapPath;
try {
if (Strings.isNullOrEmpty(mapPath)) {
URL resource = this.getClass().getClassLoader().getResource("defaultWhiteListMap.json");
actualPath = resource.getFile();
LOGGER.info("using default whiteList map located at [%s]", actualPath);
fileContent = Resources.toString(resource, Charset.defaultCharset());
} else {
fileContent = Files.asCharSource(new File(mapPath), StandardCharsets.UTF_8).read();
}
return mapper.readerFor(new TypeReference<ImmutableSortedMap<String, ImmutableSet<String>>>()
{
}).readValue(fileContent);
}
catch (IOException e) {
throw new ISE(e, "Got an exception while parsing file [%s]", actualPath);
}
}
}
View on GitHub (pinned to 9b90983fd2)