{"record":{"id":"6e393f76efd2b988","repo":"pentaho/pentaho-kettle","slug":"dynamic-driver-effectiveclassname-does-not-accept-url-url","errorCode":null,"errorMessage":"Dynamic driver '{effectiveClassName}' does not accept URL: {url} — check the JDBC URL format.","messagePattern":"Dynamic driver '(.+?)' does not accept URL: (.+?) — check the JDBC URL format\\.","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/Database.java","lineNumber":952,"sourceCode":"   */\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;\n    } catch ( Exception e ) {\n      throw new KettleDatabaseException(\n        \"Dynamic driver '\" + effectiveClassName + \"' failed to connect to URL '\"\n          + url + \"': \" + errorMsg( e ), e );\n    }","sourceCodeStart":934,"sourceCodeEnd":970,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/Database.java#L934-L970","documentation":"After acceptsURL returned false (without throwing), PDI refuses to connect and throws this error telling the developer to check the JDBC URL format. It means the driver loaded fine but explicitly does not recognize the URL scheme/shape given.","triggerScenarios":"connectUsingClass -> openConnectionViaDynamicDriver: localDriver.acceptsURL(url) returns false — the URL prefix doesn't match the driver's expected jdbc:subprotocol format (e.g. passing a MySQL URL to a PostgreSQL driver).","commonSituations":"Copy-pasted URL from a different database type; missing subprotocol (jdbc://host instead of jdbc:postgresql://host); wrong database type selected in the connection dialog so the wrong driver class was loaded; typos in the subprotocol.","solutions":["Check that the URL's subprotocol matches the loaded driver (jdbc:<subprotocol>://...)","Verify the DatabaseMeta database type / plugin corresponds to the URL you are using","Compare against the vendor's documented URL format","If multiple drivers are installed, ensure the correct one is resolved for this connection"],"exampleFix":"// before\nString url = \"jdbc:mysql://host/db\"; // loaded driver: postgresql\n// after\nString url = \"jdbc:postgresql://host/db\"; // matches loaded driver","handlingStrategy":"validation","validationCode":"String sub = url.startsWith(\"jdbc:\") && url.length() > 5 ? url.substring(5, url.indexOf(':', 5)) : null;\nif (sub == null || !expectedSubprotocol.equals(sub)) throw new IllegalArgumentException(\"URL subprotocol '\" + sub + \"' does not match driver '\" + expectedSubprotocol + \"'\");","typeGuard":"boolean urlMatchesDriver(String url, String subprotocol) { return url != null && url.startsWith(\"jdbc:\" + subprotocol + \":\"); }","tryCatchPattern":"try { conn = db.getConnection(); } catch (KettleDatabaseException e) { if (e.getMessage().contains(\"does not accept URL\")) { log.error(\"JDBC URL format mismatch for driver: \" + e.getMessage()); } else throw e; }","preventionTips":["Match URL subprotocol to the selected database type/plugin","Use vendor-documented URL templates","Avoid copy-pasting URLs between different database types","Check which dynamic driver got resolved for the connection"],"tags":["jdbc","url","dynamic-driver","configuration"],"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"}