{"record":{"id":"cbaabbe04fe6db69","repo":"pentaho/pentaho-kettle","slug":"jdbcdriverresolver-failed-to-download-driverid-jar-from","errorCode":null,"errorMessage":"JdbcDriverResolver: failed to download '\" + driverId + \".jar\" + \"' from '\" + downloadUrl + \"': \" + e.getMessage()","messagePattern":"JdbcDriverResolver: failed to download '\" \\+ driverId \\+ \"\\.jar\" \\+ \"' from '\" \\+ downloadUrl \\+ \"': \" \\+ e\\.getMessage\\(\\)","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/JdbcDriverResolver.java","lineNumber":318,"sourceCode":"                } finally {\n                    conn.disconnect();\n                }\n\n                // Move temp file to final location; fall back to non-atomic copy if needed.\n                moveWithAtomicFallback( tempPath, savePath );\n\n                log.logBasic( \"JdbcDriverResolver: download complete → \" + savePath );\n\n                DynamicDriverCache.getInstance().evictByJar( savePath.toAbsolutePath().toString() );\n\n                return savePath.toAbsolutePath().toString();\n\n            } catch ( KettleDatabaseException e ) {\n                deleteSilently( tempPath );\n                throw e;\n            } catch ( Exception e ) {\n                deleteSilently( tempPath );\n                throw new KettleDatabaseException(\n                        \"JdbcDriverResolver: failed to download '\" + driverId + \".jar\" + \"' from '\"\n                                + downloadUrl + \"': \" + e.getMessage(), e );\n            }\n        } finally {\n            lock.unlock();\n            DOWNLOAD_LOCKS.remove( driverId + \".jar\", lock );\n        }\n    }\n\n  /**\n   * Moves {@code source} to {@code target}, attempting an atomic move first and falling back to a\n   * non-atomic replace if the filesystem does not support atomic moves.\n   */\n  private static void moveWithAtomicFallback( Path source, Path target ) throws java.io.IOException {\n    try {\n      Files.move( source, target, StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING );\n    } catch ( java.nio.file.AtomicMoveNotSupportedException e ) {\n      Files.move( source, target, StandardCopyOption.REPLACE_EXISTING );","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/JdbcDriverResolver.java#L300-L336","documentation":"The catch-all in downloadFromService(): any non-KettleDatabaseException failure during the download — DNS failure, connect timeout, SSL error, local disk write error, interruption — is wrapped into this KettleDatabaseException containing the driver name, download URL, and e.getMessage(). The partially written temp file is deleted first.","triggerScenarios":"Network unreachable or DNS failure for the service host; connection/read timeout mid-transfer; SSL handshake failure; IOException writing the temp file to the local cache directory (disk full, permissions).","commonSituations":"Corporate proxy blocking the outbound request; VPN not connected; disk full or read-only driver cache directory; TLS certificates not trusted by the JVM truststore.","solutions":["Read the cause (getCause()) — the wrapped exception identifies network vs disk failure","Test connectivity to downloadUrl with curl from the same host","Check disk space and write permissions on the driver cache/save directory","Import required TLS certificates or configure proxy settings (http.proxyHost etc.)"],"exampleFix":"// before\n// request without proxy in a proxied corporate network → UnknownHostException/connect timeout\nSystem.setProperty( \"https.proxyHost\", \"\" );\n// after\nSystem.setProperty( \"https.proxyHost\", \"proxy.corp.example.com\" );\nSystem.setProperty( \"https.proxyPort\", \"8080\" );","handlingStrategy":"retry","validationCode":"InetAddress addr = InetAddress.getByName( host ); // fails fast on DNS problems\nFile cacheDir = new File( saveDir );\nif ( !cacheDir.canWrite() ) throw new IllegalStateException( \"driver cache dir not writable: \" + cacheDir );","typeGuard":null,"tryCatchPattern":"try { path = JdbcDriverResolver.resolve( driverId ); } catch ( KettleDatabaseException e ) { Throwable c = e.getCause(); if ( c instanceof IOException ) { /* network/disk — retry or surface clearly */ } throw e; }","preventionTips":["Configure proxy/TLS settings for outbound HTTPS","Monitor disk space on the driver cache volume","Use stable, writable directories for driver caching","Pre-download drivers during image build"],"tags":["network","io","jdbc","driver-download"],"backgroundTag":"network-request-failed","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"}