{"record":{"id":"dd5b99a1cbd5a028","repo":"pentaho/pentaho-kettle","slug":"jdbcdriverresolver-download-of-driverid-jar-failed-http","errorCode":null,"errorMessage":"JdbcDriverResolver: download of '\" + driverId + \".jar\" + \"' failed — HTTP \" + status + \" from \" + downloadUrl","messagePattern":"JdbcDriverResolver: download of '\" \\+ driverId \\+ \"\\.jar\" \\+ \"' failed — HTTP \" \\+ status \\+ \" from \" \\+ downloadUrl","errorType":"http","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/JdbcDriverResolver.java","lineNumber":288,"sourceCode":"            log.logBasic( \"JdbcDriverResolver: downloading '\" + driverId + \".jar\" + \"' from \" + downloadUrl\n                    + \" → \" + savePath );\n\n            try {\n                Files.createDirectories( saveDir );\n                HttpURLConnection conn = (HttpURLConnection) new URL( downloadUrl ).openConnection();\n                conn.setConnectTimeout( 10_000 );\n                conn.setReadTimeout( 60_000 );\n                conn.setRequestMethod( \"GET\" );\n                conn.setRequestProperty( \"Accept\", \"*/*\" );\n\n                String bearerToken = CmsTokenProvider.getInstance().getToken();\n                if ( bearerToken != null ) {\n                  conn.setRequestProperty( \"Authorization\", \"Bearer \" + bearerToken );\n                }\n\n                int status = conn.getResponseCode();\n                if ( status != HttpURLConnection.HTTP_OK ) {\n                    throw new KettleDatabaseException(\n                            \"JdbcDriverResolver: download of '\" + driverId + \".jar\" + \"' failed — HTTP \" + status\n                                    + \" from \" + downloadUrl );\n                }\n\n                try ( InputStream in = conn.getInputStream();\n                      FileOutputStream out = new FileOutputStream( tempPath.toFile() ) ) {\n                    byte[] buf = new byte[ 8192 ];\n                    int read;\n                    while ( ( read = in.read( buf ) ) != -1 ) {\n                        out.write( buf, 0, read );\n                    }\n                } 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","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/JdbcDriverResolver.java#L270-L306","documentation":"downloadFromService() performs an HTTP GET of <driverId>.jar from the configured service URL. If the HTTP response status is anything other than 200 OK, it throws this KettleDatabaseException including the status code and the full download URL.","triggerScenarios":"The connection-management service returned 404 (unknown driverId), 401/403 (invalid or missing bearer token), or 5xx when resolving a driver JAR via JdbcDriverResolver.resolve().","commonSituations":"Driver name misspelled so the service has no such artifact; expired or wrong bearer token (JDBC_SERVICE_AUTH_TOKEN); service partially down; reverse proxy returning 404 for a path the service does not expose.","solutions":["Check the reported HTTP status and the downloadUrl in the message against the service's logs","Verify the driverId exactly matches an artifact published by the service","Check/renew the bearer token used for Authorization if the status is 401/403","Retry after confirming service health if the status is 5xx"],"exampleFix":"// before\nJdbcDriverResolver.resolve( \"postgersql\" ); // 404 from service\n// after\nJdbcDriverResolver.resolve( \"postgresql\" );","handlingStrategy":"retry","validationCode":"HttpURLConnection c = (HttpURLConnection) new URL( serviceUrl + \"/\" + driverId + \".jar\" ).openConnection();\nc.setRequestMethod( \"HEAD\" );\nif ( c.getResponseCode() != 200 ) throw new IllegalStateException( \"driver not available: HTTP \" + c.getResponseCode() );","typeGuard":null,"tryCatchPattern":"try { path = JdbcDriverResolver.resolve( driverId ); } catch ( KettleDatabaseException e ) { if ( e.getMessage().contains( \"HTTP 5\" ) ) retryWithBackoff( 3 ); else throw e; }","preventionTips":["Spell driverId exactly as published by the service","Rotate bearer tokens before expiry","Monitor the driver service's health","Confirm the service URL path mapping matches resolver expectations"],"tags":["http","jdbc","driver-download"],"backgroundTag":"http-error-response","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"}