{"record":{"id":"5f2984aa4109c24d","repo":"pentaho/pentaho-kettle","slug":"http-log-unablecreateurl","errorCode":"HTTP.Log.UnableCreateUrl","errorMessage":"HTTP.Log.UnableCreateUrl","messagePattern":"HTTP\\.Log\\.UnableCreateUrl","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/http/HTTP.java","lineNumber":270,"sourceCode":"      }\n\n      if ( isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"HTTP.Log.Connecting\", baseUrl ) );\n      }\n\n      uriBuilder = new URIBuilder( baseUrl ); // the base URL with variable substitution\n\n      for ( int i = 0; i < data.argnrs.length; i++ ) {\n        String key = meta.getArgumentParameter()[ i ];\n        String value = outputRowMeta.getString( row, data.argnrs[ i ] );\n        uriBuilder.addParameter( key, value );\n      }\n      List<NameValuePair> queryParams = uriBuilder.getQueryParams();\n      if ( !queryParams.isEmpty() ) {\n        uriBuilder.setParameters( queryParams );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"HTTP.Log.UnableCreateUrl\" ), e );\n    }\n    return uriBuilder;\n  }\n\n  protected int requestStatusCode( HttpResponse httpResponse ) {\n    return httpResponse.getStatusLine().getStatusCode();\n  }\n\n  protected Header[] searchForHeaders( CloseableHttpResponse response ) {\n    return response.getAllHeaders();\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (HTTPMeta) smi;\n    data = (HTTPData) sdi;\n\n    Object[] r = getRow(); // Get row from input rowset & set row busy!\n    if ( r == null ) { // no more input to be expected...","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/http/HTTP.java#L252-L288","documentation":"The HTTP step could not construct the request URL. constructUrlBuilder builds a URIBuilder from the step's URL setting; any exception during parsing/normalization (e.g. malformed URL string) is wrapped as KettleException 'HTTP.Log.UnableCreateUrl'.","triggerScenarios":"constructUrlBuilder called by callHttpService throws while creating/parsing the URIBuilder from the (environment-substituted) URL string or while re-setting query parameters — e.g. new URIBuilder(url) receiving a syntactically invalid URI.","commonSituations":"URL variable not set or empty after substitution; URL missing scheme (http://); spaces, braces or other illegal characters left in the URL string; typo in the URL field configuration.","solutions":["Check the URL setting in the step dialog for typos, missing scheme, or illegal characters.","Verify the variables used in the URL resolve to valid values at runtime (kettle.properties / environment).","URL-encode dynamic path/query segments before inserting them into the URL string.","Validate with new URI(url) in a quick test to see the exact parse error."],"exampleFix":"// before\nString url = \"myhost.example.com/api ${env}\"; // no scheme, raw space\n// after\nString url = \"https://myhost.example.com/api/\" + URLEncoder.encode( environmentSubstitute( \"${env}\" ), \"UTF-8\" );","handlingStrategy":"validation","validationCode":"// validate the URL parses before the step runs\ntry { new URI( url ).parseServerAuthority(); } catch ( URISyntaxException e ) { throw new IllegalArgumentException( \"malformed URL: \" + url ); }","typeGuard":null,"tryCatchPattern":"try { uriBuilder = constructUrlBuilder( outputRowMeta, row ); } catch ( KettleException e ) { logError( \"Cannot build URL from \" + urlSetting, e ); putError( ... ); }","preventionTips":["Always include an explicit http:// or https:// scheme in the URL setting","URL-encode variables used inside the URL","Preview the transformation and log the fully substituted URL during development"],"tags":["http","url","configuration","kettle"],"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"}