{"record":{"id":"12a42f352d6e30e0","repo":"pentaho/pentaho-kettle","slug":"dynamic-driver-effectiveclassname-threw-exception-checking","errorCode":null,"errorMessage":"Dynamic driver '{effectiveClassName}' threw exception checking URL '{url}': {errorMsg}","messagePattern":"Dynamic driver '(.+?)' threw exception checking URL '(.+?)': (.+?)","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/Database.java","lineNumber":947,"sourceCode":"  }\n\n  /**\n   * Opens a JDBC connection via the already-loaded {@link #dynamicDriver}, bypassing\n   * {@link DriverManager}. Validates URL acceptance before connecting.\n   */\n  private Connection openConnectionViaDynamicDriver( String effectiveClassName, String url, Properties properties )\n    throws KettleDatabaseException {\n    Driver localDriver = dynamicDriver.get();\n    if ( localDriver == null ) {\n      throw new KettleDatabaseException(\n        \"Dynamic driver for '\" + effectiveClassName + \"' has been unloaded (disconnect was called concurrently). \"\n          + \"Reconnect to reload the driver.\" );\n    }\n    boolean accepts;\n    try {\n      accepts = localDriver.acceptsURL( url );\n    } catch ( Exception e ) {\n      throw new KettleDatabaseException(\n        \"Dynamic driver '\" + effectiveClassName + \"' threw exception checking URL '\"\n          + url + \"': \" + errorMsg( e ), e );\n    }\n    if ( !accepts ) {\n      throw new KettleDatabaseException(\n        \"Dynamic driver '\" + effectiveClassName + \"' does not accept URL: \" + url\n          + \" — check the JDBC URL format.\" );\n    }\n    try {\n      Connection c = localDriver.connect( url, properties );\n      if ( c == null ) {\n        throw new KettleDatabaseException(\n          \"Dynamic driver '\" + effectiveClassName + \"' returned null for URL: \" + url\n            + \" — check that the URL format and driver class are correct.\" );\n      }\n      return c;\n    } catch ( KettleDatabaseException e ) {\n      throw e;","sourceCodeStart":929,"sourceCodeEnd":965,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/Database.java#L929-L965","documentation":"Before connecting, the dynamic driver's acceptsURL(url) is probed. If that call throws any Exception (driver bugs, classloading of driver internals, driver-level config parse errors), it is wrapped in this error with the driver class, URL, and cause message. It means the driver itself misbehaved while validating the URL, not that the URL was rejected.","triggerScenarios":"connectUsingClass -> openConnectionViaDynamicDriver invokes localDriver.acceptsURL(url) and the driver implementation throws (e.g. its own sub-parser crashes, NPE in driver, missing driver dependency triggered during URL parse).","commonSituations":"Malformed URL that triggers a driver parsing bug; driver missing optional dependency jars needed during URL validation; broken driver version; exotic URL parameters the driver can't handle.","solutions":["Inspect errorMsg(e) / the cause for the driver's internal failure","Fix the JDBC URL (remove unsupported or malformed parameters)","Check that the driver's dependency JARs were provided via extra JARs list","Try a different driver version known to handle your URL format"],"exampleFix":"// before\nString url = \"jdbc:postgresql://host:5432/db?sslmode=xyz\"; // driver chokes on param\n// after\nString url = \"jdbc:postgresql://host:5432/db?sslmode=require\";","handlingStrategy":"try-catch","validationCode":"// pre-validate URL shape before connecting\nif (!url.startsWith(\"jdbc:\")) throw new IllegalArgumentException(\"URL must start with jdbc:\");","typeGuard":null,"tryCatchPattern":"try { conn = db.getConnection(); } catch (KettleDatabaseException e) { if (e.getMessage().contains(\"threw exception checking URL\")) { log.error(\"Driver bug on acceptsURL: \" + e.getCause(), e); } else throw e; }","preventionTips":["Keep JDBC URLs within documented parameter sets for the driver","Ship all driver dependency JARs so internal URL parsing doesn't NPE","Test the URL against the driver standalone before wiring into PDI","Pin known-good driver versions"],"tags":["jdbc","url","dynamic-driver","driver-bug"],"backgroundTag":"invalid-url-format","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}