{"record":{"id":"15d9669a927f72bb","repo":"apache/druid","slug":"got-an-exception-while-parsing-file-s-15d966","errorCode":null,"errorMessage":"Got an exception while parsing file [%s]","messagePattern":"Got an exception while parsing file \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java","lineNumber":291,"sourceCode":"  private ImmutableSortedMap<String, ImmutableSet<String>> readMap(final String mapPath)\n  {\n    String fileContent;\n    String actualPath = mapPath;\n    try {\n      if (Strings.isNullOrEmpty(mapPath)) {\n        URL resource = this.getClass().getClassLoader().getResource(\"defaultWhiteListMap.json\");\n        actualPath = resource.getFile();\n        LOGGER.info(\"using default whiteList map located at [%s]\", actualPath);\n        fileContent = Resources.toString(resource, Charset.defaultCharset());\n      } else {\n        fileContent = Files.asCharSource(new File(mapPath), StandardCharsets.UTF_8).read();\n      }\n      return mapper.readerFor(new TypeReference<ImmutableSortedMap<String, ImmutableSet<String>>>()\n      {\n      }).readValue(fileContent);\n    }\n    catch (IOException e) {\n      throw new ISE(e, \"Got an exception while parsing file [%s]\", actualPath);\n    }\n  }\n}\n","sourceCodeStart":273,"sourceCodeEnd":295,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java#L273-L295","documentation":"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.","triggerScenarios":"Thrown at extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java:291 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}