{"record":{"id":"3cbe94c90ad094e6","repo":"apache/druid","slug":"failed-to-get-dependencies-for-extension-s","errorCode":null,"errorMessage":"Failed to get dependencies for extension [%s]","messagePattern":"Failed to get dependencies for extension \\[(.+?)\\]","errorType":"validation","errorClass":"RE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/guice/ExtensionsLoader.java","lineNumber":407,"sourceCode":"              throw new RE(\n                  StringUtils.format(\n                      \"The extension [%s] has multiple jars [%s] [%s] with dependencies in them. Each jar should be in a separate extension directory.\",\n                      extension.getName(),\n                      druidExtensionDependenciesJarName,\n                      jarFile.getName()\n                  )\n              );\n            }\n            druidExtensionDependencies = objectMapper.readValue(\n                jarFile.getInputStream(entry),\n                DruidExtensionDependencies.class\n            );\n            druidExtensionDependenciesJarName = jarFile.getName();\n          }\n        }\n      }\n      catch (IOException e) {\n        throw new RE(e, \"Failed to get dependencies for extension [%s]\", extension);\n      }\n    }\n    return druidExtensionDependencies == null ? Optional.empty() : Optional.of(druidExtensionDependencies);\n  }\n\n  private class ServiceLoadingFromExtensions<T>\n  {\n    private final boolean isEmbeddedTest;\n    private final Class<T> serviceClass;\n    private final List<T> implsToLoad = new ArrayList<>();\n    private final Set<String> implClassNamesToLoad = new HashSet<>();\n\n    private ServiceLoadingFromExtensions(Class<T> serviceClass)\n    {\n      this.isEmbeddedTest = extensionsConfig.getModulesForEmbeddedTest() != null;\n      if (isEmbeddedTest) {\n        log.warn(\n            \"Running service in embedded testing mode with allowed modules[%s].\"","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/guice/ExtensionsLoader.java#L389-L425","documentation":"getDruidExtensionDependencies() opens each jar in an extension directory to look for druid-extension-dependencies.json. If reading a jar throws IOException, it is wrapped in this RE, meaning the extension's dependencies could not be determined and the extension cannot be classloaded properly.","triggerScenarios":"A jar in the extension directory is corrupt, truncated, unreadable (permissions), or deleted mid-scan, causing JarFile iteration to throw IOException during the dependency scan.","commonSituations":"Partially downloaded/copied extension jars (truncated uploads); jars owned by another user with restrictive permissions; corrupted jars on a bad disk or NFS mount; fat jars that are not valid zips.","solutions":["Validate each jar with `unzip -t <jar>` and re-download/replace corrupt ones","Fix file permissions so the Druid process user can read the jars","Remove broken jars from the extension directory","Verify the extensions directory storage (NFS/disk) is healthy and fully synced"],"exampleFix":"// before\ncp myext.jar extensions/myext/  # interrupted copy\n// after\nrsync --checksum myext.jar extensions/myext/ && unzip -t extensions/myext/myext.jar","handlingStrategy":"try-catch","validationCode":"for (File jar : extDir.listFiles((d,n)->n.endsWith(\".jar\"))) {\n  try (JarFile jf = new JarFile(jar)) { /* validate */ }\n  catch (IOException e) { throw new IllegalStateException(\"Corrupt/unreadable jar: \" + jar, e); }\n}","typeGuard":null,"tryCatchPattern":"try { loadExtension(ext); } catch (RE e) {\n  if (e.getCause() instanceof IOException) { revalidateOrReinstallJars(extDir); }\n  throw e;\n}","preventionTips":["Verify jar integrity (unzip -t / checksums) after copying extensions","Ensure the Druid runtime user has read access to all extension jars","Avoid installing extensions from flaky network shares; copy to local disk"],"tags":["extensions","io","jar"],"backgroundTag":"file-read-failed","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"}