{"record":{"id":"e8b0b0418fecf755","repo":"apache/druid","slug":"jdbc-driver-jar-files-missing-from-extensions-drui","errorCode":null,"errorMessage":"JDBC driver JAR files missing from extensions/druid-lookups-cached-global directory","messagePattern":"JDBC driver JAR files missing from extensions/druid-lookups-cached-global directory","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/JdbcCacheGenerator.java","lineNumber":86,"sourceCode":"      final JdbcExtractionNamespace namespace,\n      final CacheScheduler.EntryImpl<JdbcExtractionNamespace> entryId,\n      final String lastVersion,\n      final CacheHandler cache\n  )\n  {\n    final long lastCheck = lastVersion == null ? JodaUtils.MIN_INSTANT : Long.parseLong(lastVersion);\n    final Long lastDBUpdate;\n    final long dbQueryStart;\n\n    try {\n      lastDBUpdate = lastUpdates(entryId, namespace);\n      if (lastDBUpdate != null && lastDBUpdate <= lastCheck) {\n        return null;\n      }\n    }\n    catch (UnableToObtainConnectionException e) {\n      if (e.getMessage().contains(NO_SUITABLE_DRIVER_FOUND_ERROR)) {\n        throw new ISE(e, JDBC_DRIVER_JAR_FILES_MISSING_ERROR);\n      } else {\n        throw e;\n      }\n    }\n    dbQueryStart = System.currentTimeMillis();\n\n    LOG.debug(\"Updating %s\", entryId);\n\n    final String newVersion;\n    if (lastDBUpdate != null) {\n      newVersion = lastDBUpdate.toString();\n    } else {\n      newVersion = StringUtils.format(\"%d\", dbQueryStart);\n    }\n\n    final long startNs = System.nanoTime();\n    try (\n        Handle handle = getHandle(entryId, namespace);","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/JdbcCacheGenerator.java#L68-L104","documentation":"JdbcCacheGenerator opens a JDBC connection to refresh the lookup cache. When the connection attempt fails because no suitable JDBC driver was registered (UnableToObtainConnectionException mentioning 'No suitable driver'), the generator translates it into this explicit ISE, since Druid does not bundle JDBC drivers for lookups.","triggerScenarios":"generateCache() connecting to the configured JDBC lookup when the driver class/JAR is not on the classpath, so DriverManager cannot find a suitable driver.","commonSituations":"Forgetting to place the JDBC driver JAR into the extensions/druid-lookups-cached-global directory; wrong jdbcDriverClass; driver JAR present but not loaded via extension loading; using a driver incompatible with the JVM.","solutions":["Copy the JDBC driver JAR into extensions/druid-lookups-cached-global/ and restart the Druid process.","Verify the jdbcDriverClass name in the JDBC lookup config matches the driver (e.g. com.mysql.cj.jdbc.Driver).","Confirm the extension directory is included in druid.extensions.loadList / the runtime classpath."],"exampleFix":"# before\nls extensions/druid-lookups-cached-global/   # no mysql-connector jar\n# after\ncp mysql-connector-j-8.x.jar extensions/druid-lookups-cached-global/","handlingStrategy":"validation","validationCode":"// before scheduling a JDBC lookup\nFile extDir = new File(\"extensions/druid-lookups-cached-global\");\nboolean driverPresent = extDir.exists() && Arrays.stream(extDir.listFiles()).anyMatch(f -> f.getName().matches(\"(mysql|postgresql|mariadb).*\\\\.jar\"));","typeGuard":null,"tryCatchPattern":"try { scheduler.schedule(jdbcNamespace); } catch (IllegalStateException e) { if (e.getMessage().contains(\"JDBC driver JAR files missing\")) { /* deploy driver JAR and retry */ } else { throw e; } }","preventionTips":["Ship the JDBC driver JAR with the lookups-cached-global extension","Pin driver artifact in your Druid deployment packaging","Smoke-test JDBC lookups on startup"],"tags":["jdbc","classpath","driver"],"backgroundTag":"missing-dependency","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}