pentaho/pentaho-kettle · error · KettleException

GetXMLData.Log.NoFiles (localized message)

Error message

GetXMLData.Log.NoFiles (localized message)

What it means

GetXMLData throws this when the step is configured to read XML from files (not from a field), and the resolved file list is empty while 'Do not fail if no file' is unchecked. KettleException wrapping the localized message 'GetXMLData.Log.NoFiles'. It fails the transformation rather than silently producing zero rows.

Solutions

  1. Verify the file/folder paths and wildcards in the 'File' tab resolve on the machine running the transformation (watch for case sensitivity and Windows vs Linux paths).
  2. Tick 'Do not fail if no file' in the step settings if an empty input is an expected, non-fatal case.
  3. Check variable/environment substitutions resolve correctly (log them with a 'Get Variables' step or log the resolved filenames).
  4. Add an upstream dependency/gate so the transformation only runs after the input files exist.

Example fix

// before
meta.setdoNotFailIfNoFile( false );
// after
meta.setdoNotFailIfNoFile( true ); // tolerate empty input
Defensive patterns

Strategy: validation

Validate before calling

// Java / Kettle Java API: check resolved files before running
FileInputList files = meta.getFiles( transMeta.getBowl(), transMeta );
if ( files.nrOfFiles() == 0 && !meta.isdoNotFailIfNoFile() ) {
  throw new IllegalStateException( "No input files resolved for GetXMLData - check paths/wildcards" );
}

Try / catch

try { trans.execute( null ); } catch ( KettleException e ) { if ( e.getMessage().contains( "NoFiles" ) ) { log.warn( "Empty input, skipping run" ); } else { throw e; } }

Prevention

When it happens

Trigger: processRow, on first row, when meta.isInFields() is false, meta.isdoNotFailIfNoFile() is false, and meta.getFiles(...) returns a FileInputList with nrOfFiles()==0.

Common situations: Wildcard/glob patterns match nothing (wrong directory, case-sensitive filesystem), files not yet delivered by an upstream process, wrong variable substitution (${Internal.Transformation.Filename.Directory} pointing elsewhere), or the file was deleted between scheduling and execution.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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

Appendix: source

Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/getxmldata/GetXMLData.java:637

      }
    } catch ( Exception e ) {
      logError( BaseMessages.getString( PKG, "GetXMLData.Log.UnableToOpenFile", "" + data.filenr, data.file.toString(),
          e.toString() ) );
      stopAll();
      setErrors( 1 );
      return false;
    }
    return true;
  }

  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    if ( first && !meta.isInFields() ) {
      first = false;

      data.files = meta.getFiles( getTransMeta().getBowl(), this );

      if ( !meta.isdoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {
        throw new KettleException( BaseMessages.getString( PKG, "GetXMLData.Log.NoFiles" ) );
      }

      handleMissingFiles();

      // Create the output row meta-data
      data.outputRowMeta = new RowMeta();

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

      // Create convert meta-data objects that will contain Date & Number formatters
      // For String to <type> conversions, we allocate a conversion meta data row as well...
      //
      data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
    }
    // Grab a row
    Object[] r = getXMLRow();
    if ( data.errorInRowButContinue ) {

View on GitHub (pinned to f3058517a1)