pentaho/pentaho-kettle · error · KettleException

AutoDoc.Exception.FileTypeFieldNotFound

AutoDoc.Exception.FileTypeFieldNotFound

Error message

AutoDoc.Exception.FileTypeFieldNotFound

What it means

AutoDoc.processRow throws KettleException 'AutoDoc.Exception.FileTypeFieldNotFound' when the configured file type field is absent from the input row metadata. indexOfValue returns -1 for the fileTypeField name and the step throws. Same family as the filename-field error but for the file type column.

Solutions

  1. Reselect the correct file type field in the AutoDoc step dialog.
  2. Ensure the upstream step outputs the file type column (e.g. from a Get repository names step).
  3. Add or rename the field upstream with Select values if it was changed.
  4. Preview input rows to verify field presence and spelling.

Example fix

// before
meta.setFileTypeField("typ"); // not in stream
// after
meta.setFileTypeField("filetype"); // matches upstream column
Defensive patterns

Strategy: validation

Validate before calling

public static void requireField(RowMetaInterface rowMeta, String fieldName) {
  try {
    rowMeta.indexOfValue(fieldName);
  } catch (KettleValueException e) {
    throw new IllegalStateException("Field not in input stream: " + fieldName);
  }
}
// call: requireField(inputRowMeta, "filetype");

Prevention

When it happens

Trigger: The 'file type field' configured on the AutoDoc step (holding values like 'Transformation' or 'Job') is not present in the incoming row's fields.

Common situations: Upstream step renamed/dropped the type column; wrong step configuration after copying an existing AutoDoc step; field only exists on a different hop.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java:152

      data.outputRowMeta = getInputRowMeta().clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );

      // Get the filename field index...
      //
      String filenameField = environmentSubstitute( meta.getFilenameField() );
      data.fileNameFieldIndex = getInputRowMeta().indexOfValue( filenameField );
      if ( data.fileNameFieldIndex < 0 ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "AutoDoc.Exception.FilenameFieldNotFound", filenameField ) );
      }

      // Get the file type field index...
      //
      String fileTypeField = environmentSubstitute( meta.getFileTypeField() );
      data.fileTypeFieldIndex = getInputRowMeta().indexOfValue( fileTypeField );
      if ( data.fileTypeFieldIndex < 0 ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "AutoDoc.Exception.FileTypeFieldNotFound", fileTypeField ) );
      }

      data.repository = getTrans().getRepository();
      if ( data.repository != null ) {
        data.tree = data.repository.loadRepositoryDirectoryTree();
      }

      // Initialize the repository information handlers (images, metadata, loading, etc)
      //
      TransformationInformation.init( getTrans().getRepository() );
      JobInformation.init( getTrans().getRepository() );
    }

    // One more transformation or job to place in the documentation.
    //
    String fileName = getInputRowMeta().getString( row, data.fileNameFieldIndex );
    String fileType = getInputRowMeta().getString( row, data.fileTypeFieldIndex );

View on GitHub (pinned to f3058517a1)