pentaho/pentaho-kettle · error · KettleXMLException

Unable to load step info from XML

Error message

Unable to load step info from XML

What it means

Thrown from SalesforceInputMeta.readData() when parsing the step's XML definition (loadXML) fails. Every element read (fields, row limit) is inside a try/catch that rethrows as KettleXMLException('Unable to load step info from XML').

Solutions

  1. Open the .ktr in a text editor and validate the XML of the Salesforce Input step block against a known-good copy
  2. Check the wrapped cause — it names the exact element that failed to parse
  3. Recreate the step in Spoon and re-enter its configuration, or paste the step XML from a working transformation
  4. Upgrade/downgrade so the file's PDI version matches the runtime version
Defensive patterns

Strategy: validation

Validate before calling

Document doc = XMLHandler.loadXMLFile(new File(ktrPath));
Node stepNode = XMLHandler.getSubNode(doc, "transformation");
if (stepNode == null) throw new IllegalArgumentException("Not a valid .ktr: missing transformation node");

Try / catch

try {
  transMeta = new TransMeta(ktrPath, rep);
} catch (KettleXMLException e) {
  log.error("Failed to load step XML: {}", e.getCause(), e);
  throw e;
}

Prevention

When it happens

Trigger: loadXML() called with a <step> XML node that is missing or contains malformed child elements — e.g. a corrupt or hand-edited .ktr file, a <fields> node with an invalid field definition, or an unexpected structure where XMLHandler.getTagValue returns something invalid.

Common situations: Opening a transformation file saved by a different PDI version (XML schema drift); manual edit of the .ktr that broke the XML; copy-pasting step XML between transformations with truncation.

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/c519f37d9bfffd42. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinput/SalesforceInputMeta.java:563

      setRecordsFilter(
        SalesforceConnectionUtils.getRecordsFilterByCode( Const.NVL( XMLHandler.getTagValue(
          stepnode, "records_filter" ), "" ) ) );
      setQueryAll( "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "queryAll" ) ) );

      Node fields = XMLHandler.getSubNode( stepnode, "fields" );
      int nrFields = XMLHandler.countNodes( fields, "field" );

      allocate( nrFields );

      for ( int i = 0; i < nrFields; i++ ) {
        Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );
        SalesforceInputField field = new SalesforceInputField( fnode );
        inputFields[i] = field;
      }
      // Is there a limit on the number of rows we process?
      setRowLimit( XMLHandler.getTagValue( stepnode, "limit" ) );
    } catch ( Exception e ) {
      throw new KettleXMLException( "Unable to load step info from XML", e );
    }
  }

  public void allocate( int nrfields ) {
    setInputFields( new SalesforceInputField[nrfields] );
  }

  public int getNrFields() {
    return nrFields;
  }

  @Override
  public void setDefault() {
    super.setDefault();
    setIncludeDeletionDate( false );
    setQueryAll( false );
    setReadFrom( "" );
    setReadTo( "" );

View on GitHub (pinned to f3058517a1)