{"record":{"id":"20e6326896f75388","repo":"pentaho/pentaho-kettle","slug":"xbaseinputmeta-exception-unabletoreadstepinformationfromxml","errorCode":null,"errorMessage":"XBaseInputMeta.Exception.UnableToReadStepInformationFromXML","messagePattern":"XBaseInputMeta\\.Exception\\.UnableToReadStepInformationFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java","lineNumber":269,"sourceCode":"  }\n\n  private void readData( Node stepnode ) throws KettleXMLException {\n    try {\n      dbfFileName = XMLHandler.getTagValue( stepnode, \"file_dbf\" );\n      rowLimit = Const.toInt( XMLHandler.getTagValue( stepnode, \"limit\" ), 0 );\n      rowNrAdded = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"add_rownr\" ) );\n      rowNrField = XMLHandler.getTagValue( stepnode, \"field_rownr\" );\n\n      includeFilename = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"include\" ) );\n      filenameField = XMLHandler.getTagValue( stepnode, \"include_field\" );\n      charactersetName = XMLHandler.getTagValue( stepnode, \"charset_name\" );\n\n      acceptingFilenames = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"accept_filenames\" ) );\n      acceptingField = XMLHandler.getTagValue( stepnode, \"accept_field\" );\n      acceptingStepName = XMLHandler.getTagValue( stepnode, \"accept_stepname\" );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"XBaseInputMeta.Exception.UnableToReadStepInformationFromXML\" ), e );\n    }\n  }\n\n  @Override\n  public void setDefault() {\n    dbfFileName = null;\n    rowLimit = 0;\n    rowNrAdded = false;\n    rowNrField = null;\n  }\n\n  public String getLookupStepname() {\n    if ( acceptingFilenames && acceptingStep != null && !Utils.isEmpty( acceptingStep.getName() ) ) {\n      return acceptingStep.getName();\n    }\n    return null;\n  }","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java#L251-L287","documentation":"Thrown by XBaseInputMeta.readData() when deserializing step metadata from a transformation's XML (via loadXML). Any exception while reading expected XML tags (row number, filename/directory, wildcards, accept-fields settings) is wrapped in a KettleXMLException with this localized message. It indicates the step XML in the .ktr file is malformed, incomplete, or from an incompatible version.","triggerScenarios":"Loading a .ktr transformation whose <step> XML for an XBase Input node is missing expected tags or has invalid values; XMLHandler.getTagValue returns unexpected data or an exception occurs in tag parsing.","commonSituations":"Hand-edited or truncated .ktr files, transformations from newer/older Pentaho versions with different XML schemas, copy-paste of step XML between files introducing invalid elements.","solutions":["Open the .ktr in Spoon and re-open the XBase Input step dialog; saving it again regenerates valid XML.","Inspect the step's XML block in the .ktr for missing/malformed tags (accept_filenames, accept_field, accept_stepname, filename fields).","Restore the transformation from backup or version control.","Check the chained cause for the exact XML parsing failure (e.g. bad encoding, invalid characters).","Ensure the Pentaho version reading the file supports the XML elements written by the version that saved it."],"exampleFix":"// before: hand-edited step XML missing fields\n<step><name>XBase Input</name><type>XBaseInput</type></step>\n\n// after: include required tags (via Spoon save or complete XML)\n<step>\n  <name>XBase Input</name>\n  <type>XBaseInput</type>\n  <row_number/>\n  <filename>...</filename>\n  <accept_filenames>N</accept_filenames>\n  <accept_field/>\n  <accept_stepname/>\n</step>","handlingStrategy":"validation","validationCode":"Document doc = XMLHandler.loadXMLFile( new FileInputStream( ktrFile ) );\nNode stepNode = XMLHandler.getSubNode(\n  XMLHandler.getSubNode( doc, \"transformation\" ), \"step\" );\nif ( stepNode == null\n  || XMLHandler.getTagValue( stepNode, \"type\" ) == null\n  || !\"XBaseInput\".equals( XMLHandler.getTagValue( stepNode, \"type\" ) ) ) {\n  throw new IllegalArgumentException( \"XBase Input step XML is missing or malformed\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXML( ... );\n} catch ( KettleXMLException e ) {\n  logError( \"Corrupt step XML in .ktr: \" + e.getCause(), e );\n  // fall back to a backup copy of the transformation\n}","preventionTips":["Edit .ktr files only in Spoon; avoid hand-editing step XML.","Keep transformations in version control so corrupted files can be reverted.","Verify Pentaho version compatibility when moving transformations between environments.","Round-trip test: load and re-save migrated transformations before production use."],"tags":["pdi","xml","deserialization","metadata"],"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"}