pentaho/pentaho-kettle · error · KettleXMLException

XBaseInputMeta.Exception.UnableToReadStepInformationFromXML

Error message

XBaseInputMeta.Exception.UnableToReadStepInformationFromXML

What it means

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.

Solutions

  1. Open the .ktr in Spoon and re-open the XBase Input step dialog; saving it again regenerates valid XML.
  2. Inspect the step's XML block in the .ktr for missing/malformed tags (accept_filenames, accept_field, accept_stepname, filename fields).
  3. Restore the transformation from backup or version control.
  4. Check the chained cause for the exact XML parsing failure (e.g. bad encoding, invalid characters).
  5. Ensure the Pentaho version reading the file supports the XML elements written by the version that saved it.

Example fix

// before: hand-edited step XML missing fields
<step><name>XBase Input</name><type>XBaseInput</type></step>

// after: include required tags (via Spoon save or complete XML)
<step>
  <name>XBase Input</name>
  <type>XBaseInput</type>
  <row_number/>
  <filename>...</filename>
  <accept_filenames>N</accept_filenames>
  <accept_field/>
  <accept_stepname/>
</step>
Defensive patterns

Strategy: validation

Validate before calling

Document doc = XMLHandler.loadXMLFile( new FileInputStream( ktrFile ) );
Node stepNode = XMLHandler.getSubNode(
  XMLHandler.getSubNode( doc, "transformation" ), "step" );
if ( stepNode == null
  || XMLHandler.getTagValue( stepNode, "type" ) == null
  || !"XBaseInput".equals( XMLHandler.getTagValue( stepNode, "type" ) ) ) {
  throw new IllegalArgumentException( "XBase Input step XML is missing or malformed" );
}

Try / catch

try {
  transMeta.loadXML( ... );
} catch ( KettleXMLException e ) {
  logError( "Corrupt step XML in .ktr: " + e.getCause(), e );
  // fall back to a backup copy of the transformation
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/20e6326896f75388. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java:269

  }

  private void readData( Node stepnode ) throws KettleXMLException {
    try {
      dbfFileName = XMLHandler.getTagValue( stepnode, "file_dbf" );
      rowLimit = Const.toInt( XMLHandler.getTagValue( stepnode, "limit" ), 0 );
      rowNrAdded = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "add_rownr" ) );
      rowNrField = XMLHandler.getTagValue( stepnode, "field_rownr" );

      includeFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "include" ) );
      filenameField = XMLHandler.getTagValue( stepnode, "include_field" );
      charactersetName = XMLHandler.getTagValue( stepnode, "charset_name" );

      acceptingFilenames = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "accept_filenames" ) );
      acceptingField = XMLHandler.getTagValue( stepnode, "accept_field" );
      acceptingStepName = XMLHandler.getTagValue( stepnode, "accept_stepname" );

    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "XBaseInputMeta.Exception.UnableToReadStepInformationFromXML" ), e );
    }
  }

  @Override
  public void setDefault() {
    dbfFileName = null;
    rowLimit = 0;
    rowNrAdded = false;
    rowNrField = null;
  }

  public String getLookupStepname() {
    if ( acceptingFilenames && acceptingStep != null && !Utils.isEmpty( acceptingStep.getName() ) ) {
      return acceptingStep.getName();
    }
    return null;
  }

View on GitHub (pinned to f3058517a1)