pentaho/pentaho-kettle · error · KettleException

Rest.Exception.ErrorFindingField

Rest.Exception.ErrorFindingField

Error message

Rest.Exception.ErrorFindingField

What it means

Thrown in calcURL (from processRow) with message 'Error finding field [{0}] in incoming stream!': the configured URL field name does not exist in the incoming row metadata, so its index cannot be resolved (indexOfValue returned -1).

Solutions

  1. Check the incoming hop's field list (right-click step > Preview / View input fields) and set 'URL field name' to an exact existing field.
  2. Fix case/spelling so it matches the stream field exactly.
  3. Restore or rename the upstream field that used to carry the URL.
  4. Verify any ${variable} used in the field name resolves to a real field name at runtime.

Example fix

// before
url_field="Url"   // stream actually has lowercase 'url'
// after
url_field="url"   // matches data.inputRowMeta.indexOfValue("url") >= 0
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the configured URL field exists in the stream before the REST step
RowMetaInterface in = transMeta.getPrevStepFields(restStepName);
if (restMeta.isUrlInField() && in.indexOfValue(restMeta.getUrlField()) < 0) {
  throw new IllegalStateException("URL field not in stream: " + restMeta.getUrlField());
}

Try / catch

try { processRow(); } catch (KettleException e) {
  if (e.getMessage().startsWith("Error finding field")) { /* re-check stream fields */ }
  throw e;
}

Prevention

When it happens

Trigger: meta.isUrlInField() true; after environmentSubstitute(meta.getUrlField()) the field name is not found in data.inputRowMeta during processRow.

Common situations: Upstream step was renamed or removed the URL column; case mismatch between the configured field name and the stream field (Kettle field names are case-sensitive); variable in the field name resolves to the wrong name at runtime.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/263e9d4743fb047c. Report an issue: GitHub.

Appendix: source

Thrown at plugins/rest/core/src/main/java/org/pentaho/di/trans/steps/rest/Rest.java:484

  /**
   * Calculate URL
   *
   * @throws KettleException
   */
  private void calcURL() throws KettleException {
    if ( meta.isUrlInField() ) {
      if ( Utils.isEmpty( meta.getUrlField() ) ) {
        logError( BaseMessages.getString( PKG, "Rest.Log.NoField" ) );
        throw new KettleException( BaseMessages.getString( PKG, "Rest.Log.NoField" ) );
      }
      // cache the position of the field
      if ( data.indexOfUrlField < 0 ) {
        String realUrlfieldName = environmentSubstitute( meta.getUrlField() );
        data.indexOfUrlField = data.inputRowMeta.indexOfValue( realUrlfieldName );
        if ( data.indexOfUrlField < 0 ) {
          // The field is unreachable !
          throw new KettleException(
            BaseMessages.getString( PKG, "Rest.Exception.ErrorFindingField", realUrlfieldName ) );
        }
      }
    } else {
      // Static URL
      data.realUrl = environmentSubstitute( meta.getUrl() );
    }
  }

  /**
   * Calculate method
   *
   * @throws KettleException
   */
  private void calcMethod() throws KettleException {
    if ( meta.isDynamicMethod() ) {
      String field = environmentSubstitute( meta.getMethodFieldName() );
      if ( Utils.isEmpty( field ) ) {

View on GitHub (pinned to f3058517a1)