{"record":{"id":"ad2214da7e181056","repo":"pentaho/pentaho-kettle","slug":"xmlinputstream-noincomingrowsfound","errorCode":null,"errorMessage":"XMLInputStream.NoIncomingRowsFound","messagePattern":"XMLInputStream\\.NoIncomingRowsFound","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmlinputstream/XMLInputStream.java","lineNumber":100,"sourceCode":"      first = false;\n\n      if ( data.filenames == null ) {\n        getFilenames();\n      }\n      openNextFile();\n      resetElementCounters();\n      prepareProcessPreviousFields();\n    }\n\n    Object[] outputRowData;\n    if ( meta.sourceFromInput ) {\n      Object[] row = null;\n      if ( first ) {\n        first = false;\n        row = getRow();\n        // get input field index\n        if ( getInputRowMeta() == null ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"XMLInputStream.NoIncomingRowsFound\" ) );\n        }\n        inputFieldIndex = getInputRowMeta().indexOfValue( meta.sourceFieldName );\n        if ( inputFieldIndex < 0 ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"XMLInputStream.FilenameFieldNotFound\",\n              meta.sourceFieldName ) );\n        }\n        prepareProcessPreviousFields();\n      }\n      if ( data.xmlEventReader == null ) {\n        if ( row == null ) {\n          row = getRow();\n        }\n        if ( row == null ) {\n          setOutputDone(); // signal end to receiver(s)\n          return false; // This is the end of this step.\n        }\n        String xml = getInputRowMeta().getString( row, inputFieldIndex );\n        try {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmlinputstream/XMLInputStream.java#L82-L118","documentation":"XMLInputStream.processRow throws a KettleException with 'XMLInputStream.NoIncomingRowsFound' when, on the first row, getInputRowMeta() is null - i.e. the step received no incoming row metadata at all. This XML Input (streaming) step requires an upstream step providing a field containing XML content or a filename; it cannot start a stream by itself.","triggerScenarios":"First invocation of processRow: row = getRow() returns nothing/metadata is null, so getInputRowMeta() == null and the exception is thrown before locating the source field.","commonSituations":"Placing the XML Input Stream step as the first step of a transformation with no input step, an upstream 'Generate Rows' producing zero rows with no row metadata, or a preview run where the preceding step emitted no rows.","solutions":["Add an upstream step that provides rows (e.g. Get File Names, Text File Input, Generate Rows) feeding the XML field/filename.","Ensure the upstream step actually outputs at least one row with row metadata; preview it to confirm.","If the file path is static, use the regular 'Get XML Data' (GetXMLData) step or 'Data Grid' to feed the path instead."],"exampleFix":"// before: XMLInputStream has no input hop\n// transformation: [XML Input Stream] -> [Table Output]\n// after: feed it rows\n// transformation: [Get File Names] -> [XML Input Stream] -> [Table Output]","handlingStrategy":"validation","validationCode":"// Java API: ensure the step has incoming hop metadata before execution\nif ( stepMeta.getSuitableInputSteps().isEmpty() ) {\n  throw new IllegalStateException( \"XML Input Stream needs an upstream step providing rows\" );\n}","typeGuard":null,"tryCatchPattern":"try { trans.execute( null ); } catch ( KettleException e ) { if ( e.getMessage().contains( \"NoIncomingRowsFound\" ) ) { log.error( \"Connect an input step to XML Input Stream\" ); } else { throw e; } }","preventionTips":["Never place XML Input Stream (streaming) as the first step; it consumes an incoming field.","Preview the upstream step to confirm it emits row metadata and at least one row.","Use GetXMLData (file-based) when the XML is read directly from files."],"tags":["pentaho-kettle","xml","streaming","row-metadata"],"backgroundTag":"missing-required-argument","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"}