{"record":{"id":"b220b47795ab7f30","repo":"pentaho/pentaho-kettle","slug":"fieldsplittermeta-exception-unabletoloadstepinfofromxml","errorCode":null,"errorMessage":"FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML","messagePattern":"FieldSplitterMeta\\.Exception\\.UnableToLoadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java","lineNumber":380,"sourceCode":"        final String stype = XMLHandler.getTagValue( fnode, \"type\" );\n        fieldFormat[i] = XMLHandler.getTagValue( fnode, \"format\" );\n        fieldGroup[i] = XMLHandler.getTagValue( fnode, \"group\" );\n        fieldDecimal[i] = XMLHandler.getTagValue( fnode, \"decimal\" );\n        fieldCurrency[i] = XMLHandler.getTagValue( fnode, \"currency\" );\n        final String slen = XMLHandler.getTagValue( fnode, \"length\" );\n        final String sprc = XMLHandler.getTagValue( fnode, \"precision\" );\n        fieldNullIf[i] = XMLHandler.getTagValue( fnode, \"nullif\" );\n        fieldIfNull[i] = XMLHandler.getTagValue( fnode, \"ifnull\" );\n        final String trim = XMLHandler.getTagValue( fnode, \"trimtype\" );\n\n        fieldRemoveID[i] = \"Y\".equalsIgnoreCase( sidrem );\n        fieldType[i] = ValueMetaFactory.getIdForValueMeta( stype );\n        fieldLength[i] = Const.toInt( slen, -1 );\n        fieldPrecision[i] = Const.toInt( sprc, -1 );\n        fieldTrimType[i] = ValueMetaString.getTrimTypeByCode( trim );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    splitField = \"\";\n    delimiter = \",\";\n    enclosure = null;\n    allocate( 0 );\n  }\n\n  public int getFieldsCount() {\n    int count = Math.min( getFieldName().length, getFieldType().length );\n    count = Math.min( count, getFieldLength().length );\n    count = Math.min( count, getFieldPrecision().length );\n    count = Math.min( count, getFieldFormat().length );\n    count = Math.min( count, getFieldDecimal().length );\n    count = Math.min( count, getFieldGroup().length );","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java#L362-L398","documentation":"FieldSplitterMeta.readData parses the step's XML node (loadXML path), reading the split field, delimiters, and per-field definitions. Any parse/lookup failure inside the loop is wrapped in this KettleXMLException.","triggerScenarios":"Loading a .ktr where the <fields> section is malformed or contains attribute values that fail conversion, e.g. stype/slen/sprc failing ValueMetaFactory.getIdForValueMeta or Const.toInt.","commonSituations":"Hand-edited transformation XML with invalid <field> entries; XML produced by a newer PDI version missing expected attributes; truncated/corrupt file after failed transfer.","solutions":["Inspect the wrapped cause to find which attribute failed to parse","Validate the .ktr XML against a known-good transformation","Recreate the FieldSplitter step in Spoon and re-save to regenerate clean XML","Open with the PDI version matching the file's creator"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// sanity-check the XML before load\nDocument doc = Xml.loadFile(ktrFile);\nif (doc.selectNodes(\"//step[@type='FieldSplitter']\").isEmpty()) { /* no such step; skip */ }","typeGuard":null,"tryCatchPattern":"try { meta.loadXML(stepnode, databases, metaStore); }\ncatch (KettleXMLException e) {\n  log.error(\"FieldSplitter XML corrupt: {}\", e.getCause(), e);\n  meta.setDefault(); // rebuild defaults instead of failing the whole load\n}","preventionTips":["Don't hand-edit .ktr XML; edit in Spoon","Validate files after transfer (checksum)","Open files with the PDI version that created them"],"tags":["pdi","xml","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"}