{"record":{"id":"e73fac10253ff39c","repo":"pentaho/pentaho-kettle","slug":"webserviceavailable-error-urlempty","errorCode":null,"errorMessage":"WebServiceAvailable.Error.URLEmpty","messagePattern":"WebServiceAvailable\\.Error\\.URLEmpty","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webserviceavailable/WebServiceAvailable.java","lineNumber":96,"sourceCode":"\n      // cache the position of the field\n      data.indexOfURL = data.previousRowMeta.indexOfValue( meta.getURLField() );\n      if ( data.indexOfURL < 0 ) {\n        // The field is unreachable !\n        logError( BaseMessages.getString( PKG, \"WebServiceAvailable.Exception.CouldnotFindField\" )\n          + \"[\" + meta.getURLField() + \"]\" );\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"WebServiceAvailable.Exception.CouldnotFindField\", meta.getURLField() ) );\n      }\n    } // End If first\n\n    try {\n\n      // get url\n      String url = data.previousRowMeta.getString( r, data.indexOfURL );\n\n      if ( Utils.isEmpty( url ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"WebServiceAvailable.Error.URLEmpty\" ) );\n      }\n\n      if ( isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"WebServiceAvailable.Log.CheckingURL\", url ) );\n      }\n\n      boolean WebServiceAvailable = false;\n\n      InputStream in = null;\n\n      try {\n        URLConnection conn = new URL( url ).openConnection();\n        conn.setConnectTimeout( data.connectTimeOut );\n        conn.setReadTimeout( data.readTimeOut );\n        in = conn.getInputStream();\n        // Web service is available\n        WebServiceAvailable = true;\n      } catch ( Exception e ) {","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webserviceavailable/WebServiceAvailable.java#L78-L114","documentation":"The step reads the URL string from the current row and rejects it when it is null or empty, since checking availability of an empty URL is meaningless. Thrown per-row inside processRow, so one bad row stops the step (unless error handling is configured).","triggerScenarios":"data.previousRowMeta.getString(r, data.indexOfURL) returns null or \"\" for the current row and Utils.isEmpty(url) is true.","commonSituations":"Upstream source has null/blank URL values for some records; a preceding calculator/formula produced empty strings; joined data missing URL column values.","solutions":["Filter out or default rows with empty URLs before this step (Filter rows on 'url IS NOT NULL AND url <> \"\"').","Enable the step's error handling to route empty-URL rows to a separate stream instead of failing.","Fix the upstream step so URLs are always populated.","Optionally point the empty mapping to a placeholder URL if a default target exists."],"exampleFix":"// before: feed all rows to WebServiceAvailable\n// after: add Filter rows first\nurl IS NOT NULL AND url != ''  -> WebServiceAvailable","handlingStrategy":"validation","validationCode":"int idx = rowMeta.indexOfValue(meta.getURLField());\n// per-row before the step:\nif (value == null || value.toString().trim().isEmpty()) {\n  // route to error/bad-records stream instead of the step\n}","typeGuard":null,"tryCatchPattern":"try {\n  processRow();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"URLEmpty\")) {\n    logBasic(\"Skipping row with empty URL\");\n    return true; // or route via step error handling\n  }\n  throw e;\n}","preventionTips":["Filter null/blank URLs upstream with a Filter rows step","Enable error handling on the step for bad rows","Fix upstream data sources to always populate URLs"],"tags":["pdi","kettle","webservice","empty-value","data-quality"],"backgroundTag":"empty-required-field","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"}