{"record":{"id":"94fe29c2bda87ceb","repo":"pentaho/pentaho-kettle","slug":"getxmldata-log-nofiles-localized-message","errorCode":null,"errorMessage":"GetXMLData.Log.NoFiles (localized message)","messagePattern":"GetXMLData\\.Log\\.NoFiles \\(localized message\\)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/getxmldata/GetXMLData.java","lineNumber":637,"sourceCode":"      }\n    } catch ( Exception e ) {\n      logError( BaseMessages.getString( PKG, \"GetXMLData.Log.UnableToOpenFile\", \"\" + data.filenr, data.file.toString(),\n          e.toString() ) );\n      stopAll();\n      setErrors( 1 );\n      return false;\n    }\n    return true;\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    if ( first && !meta.isInFields() ) {\n      first = false;\n\n      data.files = meta.getFiles( getTransMeta().getBowl(), this );\n\n      if ( !meta.isdoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"GetXMLData.Log.NoFiles\" ) );\n      }\n\n      handleMissingFiles();\n\n      // Create the output row meta-data\n      data.outputRowMeta = new RowMeta();\n\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      // Create convert meta-data objects that will contain Date & Number formatters\n      // For String to <type> conversions, we allocate a conversion meta data row as well...\n      //\n      data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );\n    }\n    // Grab a row\n    Object[] r = getXMLRow();\n    if ( data.errorInRowButContinue ) {","sourceCodeStart":619,"sourceCodeEnd":655,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/getxmldata/GetXMLData.java#L619-L655","documentation":"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.","triggerScenarios":"processRow, on first row, when meta.isInFields() is false, meta.isdoNotFailIfNoFile() is false, and meta.getFiles(...) returns a FileInputList with nrOfFiles()==0.","commonSituations":"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.","solutions":["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).","Tick 'Do not fail if no file' in the step settings if an empty input is an expected, non-fatal case.","Check variable/environment substitutions resolve correctly (log them with a 'Get Variables' step or log the resolved filenames).","Add an upstream dependency/gate so the transformation only runs after the input files exist."],"exampleFix":"// before\nmeta.setdoNotFailIfNoFile( false );\n// after\nmeta.setdoNotFailIfNoFile( true ); // tolerate empty input","handlingStrategy":"validation","validationCode":"// Java / Kettle Java API: check resolved files before running\nFileInputList files = meta.getFiles( transMeta.getBowl(), transMeta );\nif ( files.nrOfFiles() == 0 && !meta.isdoNotFailIfNoFile() ) {\n  throw new IllegalStateException( \"No input files resolved for GetXMLData - check paths/wildcards\" );\n}","typeGuard":null,"tryCatchPattern":"try { trans.execute( null ); } catch ( KettleException e ) { if ( e.getMessage().contains( \"NoFiles\" ) ) { log.warn( \"Empty input, skipping run\" ); } else { throw e; } }","preventionTips":["Preview the step in Spoon to confirm file resolution before scheduling.","Use variables relative to ${Internal.Transformation.Filename.Directory} and log their resolved values.","Check 'Do not fail if no file' when empty input is a legitimate state."],"tags":["pentaho-kettle","file-input","transformation","getxmldata"],"backgroundTag":"file-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"}