{"record":{"id":"ab56d2241ca02106","repo":"pentaho/pentaho-kettle","slug":"webserviceavailable-exception-couldnotfindfield","errorCode":null,"errorMessage":"WebServiceAvailable.Exception.CouldnotFindField","messagePattern":"WebServiceAvailable\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webserviceavailable/WebServiceAvailable.java","lineNumber":85,"sourceCode":"      data.previousRowMeta = getInputRowMeta().clone();\n      data.NrPrevFields = data.previousRowMeta.size();\n      data.outputRowMeta = data.previousRowMeta;\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Check is URL field is provided\n      if ( Utils.isEmpty( meta.getURLField() ) ) {\n        logError( BaseMessages.getString( PKG, \"WebServiceAvailable.Error.FilenameFieldMissing\" ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"WebServiceAvailable.Error.FilenameFieldMissing\" ) );\n      }\n\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;","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webserviceavailable/WebServiceAvailable.java#L67-L103","documentation":"After the URL field name is configured, the step looks up its index in the incoming row metadata via indexOfValue. This error is thrown when the named field does not exist in the input rows, i.e. the configured URL field name doesn't match anything the previous step produces.","triggerScenarios":"data.previousRowMeta.indexOfValue(meta.getURLField()) returns -1 on the first row; the step throws with the field name appended to the message.","commonSituations":"Typo in the configured field name; upstream step renamed/removed the field; case-sensitivity mismatch; field only produced conditionally upstream so it is absent from the row meta.","solutions":["Verify the exact field name emitted by the upstream step (View fields / preview rows) and correct the 'URL field' setting.","Reconnect the hop after changing upstream steps so row metadata refreshes.","Ensure the upstream step always produces the URL field, not only on some branches.","Use a Select values step to add/alias the field to the expected name if renaming upstream is not possible."],"exampleFix":"// before\n<urlField>Url</urlField>\n// after (matching upstream field 'url')\n<urlField>url</urlField>","handlingStrategy":"validation","validationCode":"String urlField = meta.getURLField();\nif (inputRowMeta.indexOfValue(urlField) < 0) {\n  throw new IllegalArgumentException(\"Field not in input rows: \" + urlField\n    + \"; available=\" + Arrays.toString(inputRowMeta.getFieldNames()));\n}","typeGuard":null,"tryCatchPattern":"try {\n  int idx = rowMeta.indexOfValue(meta.getURLField());\n} catch (KettleException e) {\n  logError(\"URL field missing from input stream\", e);\n}","preventionTips":["Copy field names from the upstream step's field list instead of typing them","Refresh hop metadata after restructuring upstream steps","Ensure upstream always emits the field, not only conditionally"],"tags":["pdi","kettle","webservice","field-not-found","row-metadata"],"backgroundTag":"resource-not-found","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"}