pentaho/pentaho-kettle · error · InvocationTargetException

SearchFieldsProgressDialog.Log.UnableToGetFields

SearchFieldsProgressDialog.Log.UnableToGetFields

Error message

SearchFieldsProgressDialog.Log.UnableToGetFields

What it means

SearchFieldsProgressDialog.run wraps KettleStepException from transMeta.getStepFields(...) in an InvocationTargetException with the localized message 'SearchFieldsProgressDialog.Log.UnableToGetFields', including the step name and the underlying exception message. It means the fields flowing out of a step could not be computed while building the fields search results.

Solutions

  1. Read the embedded kse.getMessage() to identify which step failed field resolution.
  2. Open the failing step's dialog and re-run 'Get Fields' so its output row metadata is rebuilt.
  3. Fix the transformation topology: reconnect broken hops or remove orphaned steps.
  4. For database steps, verify the connection and that referenced tables/columns still exist.

Example fix

// before: run search on a transformation with a broken step
fields = transMeta.getStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) );
// after: validate the step's metadata first
if ( stepInfo.getStepMetaInterface().getStepMeta() != null ) {
  fields = transMeta.getStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) );
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
  fields = transMeta.getStepFields( stepInfo, monitor );
} catch ( KettleStepException kse ) {
  log.logError( "Cannot resolve fields for step " + stepInfo.getName() + ": " + kse.getMessage(), kse );
}

Prevention

When it happens

Trigger: Running the 'Search fields' dialog when getStepFields(stepInfo, monitor) throws KettleStepException — typically a step in the path has no defined output row metadata, an upstream step is disconnected/unavailable, or a database step cannot resolve its table/columns.

Common situations: A hop is broken or a step is not initialized so its output fields are unknown; a table input step references a table that no longer exists; custom step plugins fail to implement getFields correctly.

Related errors


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

Appendix: source

Thrown at ui/src/main/java/org/pentaho/di/ui/spoon/dialog/SearchFieldsProgressDialog.java:69

    try {
      if ( before ) {
        monitor.beginTask( BaseMessages.getString(
          PKG, "SearchFieldsProgressDialog.Dialog.SearchInputFields.Message" ), size ); // Searching
                                                                                        // for
                                                                                        // input
                                                                                        // fields...
        fields = transMeta.getPrevStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) );
      } else {
        monitor.beginTask( BaseMessages.getString(
          PKG, "SearchFieldsProgressDialog.Dialog.SearchOutputFields.Message" ), size ); // Searching
                                                                                         // for
                                                                                         // output
                                                                                         // fields...
        fields = transMeta.getStepFields( stepInfo, new ProgressMonitorAdapter( monitor ) );
      }
    } catch ( KettleStepException kse ) {
      throw new InvocationTargetException( kse, BaseMessages.getString(
        PKG, "SearchFieldsProgressDialog.Log.UnableToGetFields", stepInfo.toString(), kse.getMessage() ) );
    }

    monitor.done();
  }

  /**
   * @return Returns the before.
   */
  public boolean isBefore() {
    return before;
  }

  /**
   * @param before
   *          The before to set.
   */
  public void setBefore( boolean before ) {

View on GitHub (pinned to f3058517a1)