{"record":{"id":"eee314817c57c3ac","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-fixedinputmeta","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/fixedinput/FixedInputMeta.java","lineNumber":145,"sourceCode":"      headerPresent = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"header\" ) );\n      lineFeedPresent = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"line_feed\" ) );\n      lazyConversionActive = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"lazy_conversion\" ) );\n      runningInParallel = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"parallel\" ) );\n      fileType = getFileType( XMLHandler.getTagValue( stepnode, \"file_type\" ) );\n      encoding = XMLHandler.getTagValue( stepnode, \"encoding\" );\n      isaddresult = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"add_to_result_filenames\" ) );\n\n      Node fields = XMLHandler.getSubNode( stepnode, \"fields\" );\n      int nrfields = XMLHandler.countNodes( fields, \"field\" );\n\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        Node fnode = XMLHandler.getSubNodeByNr( fields, \"field\", i );\n        fieldDefinition[i] = new FixedFileInputField( fnode );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void allocate( int nrFields ) {\n    fieldDefinition = new FixedFileInputField[nrFields];\n  }\n\n  public String getXML() {\n    StringBuilder retval = new StringBuilder( 500 );\n\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"filename\", filename ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"line_width\", lineWidth ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"header\", headerPresent ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"buffer_size\", bufferSize ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"lazy_conversion\", lazyConversionActive ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"line_feed\", lineFeedPresent ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"parallel\", runningInParallel ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"file_type\", getFileTypeCode() ) );","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/fixedinput/FixedInputMeta.java#L127-L163","documentation":"FixedInputMeta.readData (invoked by loadXML when parsing a transformation .ktr) wraps XML parsing failures of the fixed-file input step definition in a KettleXMLException with this generic message. Any malformed or unexpected XML for this step triggers it, with the parse exception chained as cause.","triggerScenarios":"loadXML on FixedInputMeta when XMLHandler lookups fail or FixedFileInputField(node) throws — missing <fields> node, malformed <field> entries, or a non-numeric attribute value.","commonSituations":"Hand-edited or truncated .ktr files; transformations exported from newer Kettle versions with attributes an older version cannot parse; copy-paste corruption of step XML between transformations.","solutions":["Open the .ktr in an XML editor and validate the <fields>/<field> structure of this step","Check the chained cause to pinpoint the exact XML attribute that failed","Re-create the step in Spoon and re-save the transformation to regenerate clean XML","Align Kettle/PDI versions between the file's producer and consumer"],"exampleFix":"// before\nNode fields = XMLHandler.getSubNode( stepnode, \"fields\" ); // NPE if missing\nint nrfields = fields.getChildCount();\n// after\nNode fields = XMLHandler.getSubNode( stepnode, \"fields\" );\nif ( fields == null ) { fields = XMLHandler.getSubNode( stepnode, \"fields\" ); allocate( 0 ); return; }","handlingStrategy":"try-catch","validationCode":"// validate step XML before loadXML\nif ( XMLHandler.getSubNode( stepnode, \"fields\" ) == null ) {\n  throw new IllegalArgumentException( \"FixedInput step XML missing <fields> node\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = new TransMeta( inputStream, provider, true, variables, listener );\n} catch ( KettleXMLException e ) {\n  logError( \"Load failed: \" + e.getCause(), e ); // locate malformed tag\n}","preventionTips":["Don't hand-edit .ktr XML; edit via Spoon","Validate XML with a schema/linter before loading","Use the same PDI version to author and run transformations","Keep transformation files under version control to detect corruption"],"tags":["pdi","kettle","xml","metadata-load"],"backgroundTag":"json-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"}