{"record":{"id":"f8d7e3446e67ba81","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-rowgeneratormeta","errorCode":null,"errorMessage":"Unable to load step info from XML","messagePattern":"Unable to load step info from XML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/rowgenerator/RowGeneratorMeta.java","lineNumber":165,"sourceCode":"        slength = XMLHandler.getTagValue( fnode, \"length\" );\n        sprecision = XMLHandler.getTagValue( fnode, \"precision\" );\n\n        fieldLength[i] = Const.toInt( slength, -1 );\n        fieldPrecision[i] = Const.toInt( sprecision, -1 );\n        String emptyString = XMLHandler.getTagValue( fnode, \"set_empty_string\" );\n        setEmptyString[i] = !Utils.isEmpty( emptyString ) && \"Y\".equalsIgnoreCase( emptyString );\n      }\n\n      // Is there a limit on the number of rows we process?\n      rowLimit = XMLHandler.getTagValue( stepnode, \"limit\" );\n\n      neverEnding = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"never_ending\" ) );\n      intervalInMs = XMLHandler.getTagValue( stepnode, \"interval_in_ms\" );\n      rowTimeField = XMLHandler.getTagValue( stepnode, \"row_time_field\" );\n      lastTimeField = XMLHandler.getTagValue( stepnode, \"last_time_field\" );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void setDefault() {\n    int i, nrfields = 0;\n\n    allocate( nrfields );\n\n    DecimalFormat decimalFormat = new DecimalFormat();\n\n    for ( i = 0; i < nrfields; i++ ) {\n      fieldName[i] = \"field\" + i;\n      fieldType[i] = \"Number\";\n      fieldFormat[i] = \"\\u00A40,000,000.00;\\u00A4-0,000,000.00\";\n      fieldLength[i] = 9;\n      fieldPrecision[i] = 2;\n      currency[i] = decimalFormat.getDecimalFormatSymbols().getCurrencySymbol();\n      decimal[i] = new String( new char[] { decimalFormat.getDecimalFormatSymbols().getDecimalSeparator() } );","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/rowgenerator/RowGeneratorMeta.java#L147-L183","documentation":"KettleXMLException thrown by RowGeneratorMeta.readData when any exception occurs while parsing the step's XML <step> node attributes (fields, limit, never_ending, interval_in_ms, row_time_field, last_time_field). loadXML calls readData during transformation deserialization, so a malformed or unexpectedly shaped .ktr file surfaces as this wrapped error.","triggerScenarios":"loadXML(stepnode, ...) is invoked while loading a transformation from XML and XMLHandler.getTagValue or another call inside readData throws (malformed XML, missing node structure, unexpected null/parse failure in a tag value).","commonSituations":"Opening a hand-edited or truncated .ktr file; a .ktr produced by a different Pentaho version with different XML attributes; copy-pasting a step XML snippet that is not nested under the expected <step> node; corrupted file transfer.","solutions":["Open the .ktr in a text editor and verify the RowGenerator step's XML block is well-formed and contains the expected tags (fields, limit, never_ending, interval_in_ms, row_time_field, last_time_field).","Read the wrapped cause 'e' in the stack trace to find the exact XML parse failure and fix that line.","Recreate the Row Generator step in Spoon and re-save the transformation to regenerate clean XML.","Confirm the file was produced by a compatible Kettle/Pentaho version; migrate via Spoon rather than manual edits."],"exampleFix":"// before: hand-edited XML missing closing tag\n<fields><field>...</fields>\n// after: well-formed step XML\n<fields><field><name>id</name><type>Integer</type></field></fields>","handlingStrategy":"try-catch","validationCode":"// Before loading, validate XML well-formedness\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(\"trans.ktr\"));","typeGuard":"Node stepNode = XMLHandler.getSubNode(stepnode, \"fields\");\nif (stepNode == null) { throw new IllegalArgumentException(\"RowGenerator step XML missing <fields> node\"); }","tryCatchPattern":"try {\n  transMeta = new TransMeta(\"trans.ktr\");\n} catch (KettleXMLException e) {\n  log.error(\"Failed to parse transformation XML: {}\", e.getCause(), e);\n  // fall back to a known-good copy of the file\n}","preventionTips":["Never hand-edit .ktr files; edit in Spoon and re-save.","Run xmllint --noout on generated XML before loading.","Keep transformations under version control to restore a known-good copy.","Always log e.getCause() to see the underlying XMLHandler failure."],"tags":["kettle","xml","deserialization","transformation-metadata"],"backgroundTag":"xml-parse-error","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"}