{"record":{"id":"3bec1e3eb8f5a9ca","repo":"pentaho/pentaho-kettle","slug":"sasinputmeta-exception-unabletoreadstepinformationfromxml","errorCode":"SASInputMeta.Exception.UnableToReadStepInformationFromXML","errorMessage":"SASInputMeta.Exception.UnableToReadStepInformationFromXML","messagePattern":"SASInputMeta\\.Exception\\.UnableToReadStepInformationFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInputMeta.java","lineNumber":80,"sourceCode":"    super(); // allocate BaseStepMeta\n  }\n\n  @Override\n  public void setDefault() {\n    outputFields = new ArrayList<SasInputField>();\n  }\n\n  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {\n    try {\n      acceptingField = XMLHandler.getTagValue( stepnode, \"accept_field\" );\n      int nrFields = XMLHandler.countNodes( stepnode, XML_TAG_FIELD );\n      outputFields = new ArrayList<SasInputField>();\n      for ( int i = 0; i < nrFields; i++ ) {\n        Node fieldNode = XMLHandler.getSubNodeByNr( stepnode, XML_TAG_FIELD, i );\n        outputFields.add( new SasInputField( fieldNode ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"SASInputMeta.Exception.UnableToReadStepInformationFromXML\" ), e );\n    }\n  }\n\n  public Object clone() {\n    SasInputMeta retval = (SasInputMeta) super.clone();\n    retval.setOutputFields( new ArrayList<SasInputField>() );\n    for ( SasInputField field : outputFields ) {\n      retval.getOutputFields().add( field.clone() );\n    }\n    return retval;\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n\n    for ( SasInputField field : outputFields ) {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInputMeta.java#L62-L98","documentation":"loadXML parses the step's saved XML definition to rebuild SasInputMeta; if any part fails (missing nodes, malformed XML, bad field nodes), it wraps the exception in a KettleXMLException using the localized message 'SASInputMeta.Exception.UnableToReadStepInformationFromXML'.","triggerScenarios":"Exception thrown in loadXML while reading the step node — e.g. the XML_TAG_FIELD subnodes count is wrong, fieldNode is null, or SasInputField(Node) fails to parse an attribute.","commonSituations":"A .ktr file edited by hand or corrupted; transformation saved with a different plugin version whose XML schema changed; truncated file transfer; mixing Pentaho versions when opening transformations.","solutions":["Open the .ktr file in a text editor and check the SAS input step's XML block for malformed or missing <fields> entries.","Recreate the step in Spoon and re-save the transformation.","Ensure the Pentaho Data Integration version that saved the file matches (or is newer than) the version opening it.","Restore the transformation from backup/version control."],"exampleFix":"// before: hand-edited XML missing a field attribute\n// after: <field><name>amount</name><rename/><length>-1</length><precision>-1</precision></field>","handlingStrategy":"try-catch","validationCode":"// Validate the step XML before loading the transformation\nNode sasNode = XMLHandler.getSubNode(transMetaXml, \"step\");\nif (XMLHandler.getTagValue(sasNode, \"fields\") == null)\n  throw new IllegalStateException(\"SAS input step XML is missing its <fields> section\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = new TransMeta(ktrFile);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"UnableToReadStepInformationFromXML\")) {\n    // inspect/repair the .ktr XML for the SAS input step or restore from backup\n  }\n  throw e;\n}","preventionTips":["Never hand-edit .ktr XML; edit steps via Spoon.","Open transformations with the same or newer PDI version that saved them.","Keep transformations in version control so corrupted files can be restored."],"tags":["xml","metadata","kettle","deserialization"],"backgroundTag":"json-unmarshal-failed","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"}