pentaho/pentaho-kettle · error · KettleXMLException

Unable to load step info from XML

Error message

Unable to load step info from XML

What it means

PropertyOutputMeta.readData parses the step's XML node with XMLHandler.getTagValue calls and wraps any parsing exception in a KettleXMLException with message "Unable to load step info from XML". This happens while deserializing a transformation (.ktr) that contains a Property Output step, e.g. when loading a saved transformation or a repository import. The cause carries the underlying XML handling error.

Solutions

  1. Open the .ktr file in a text editor and verify the Property Output step's <fields> and <file> XML blocks are well-formed.
  2. Recreate the Property Output step in Spoon and re-save the transformation.
  3. Check Pentaho/PDI version compatibility between the file's producer and your runtime.
  4. Inspect the chained cause of the KettleXMLException for the precise XMLHandler failure.

Example fix

// before (broken step XML)
<file><name>/data/out.properties</name> <!-- missing </file> close or wrong nesting -->
// after
<file><name>/data/out.properties</name><append>N</append></file>
Defensive patterns

Strategy: try-catch

Validate before calling

// validate the .ktr before loading
Document doc = XMLHandler.loadXMLFile(new File(ktrPath));
if (XMLHandler.getSubNode(doc, "transformation") == null) {
    throw new IllegalArgumentException(ktrPath + " is not a valid transformation file");
}

Try / catch

try {
    transMeta = new TransMeta(ktrPath, metaStore);
} catch (KettleXMLException e) {
    Throwable root = e;
    while (root.getCause() != null) root = root.getCause();
    logError("Bad transformation XML: " + root.getMessage());
}

Prevention

When it happens

Trigger: loadXML invokes readData(stepnode); an Exception occurs in XMLHandler.getTagValue lookups (malformed or missing stepnode structure, wrong node type, corrupt transformation file, incompatible XML produced by a different plugin version).

Common situations: Hand-edited or truncated .ktr file; transformation produced by a newer/older Pentaho version with a changed XML schema; copy-pasting step XML between transformations with mismatched node structure; corrupted repository export.

Understand the failure class

Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutputMeta.java:364

      comment = XMLHandler.getTagValue( stepnode, "comment" );

      fileName = XMLHandler.getTagValue( stepnode, "file", "name" );

      createparentfolder =
        "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "create_parent_folder" ) );
      extension = XMLHandler.getTagValue( stepnode, "file", "extention" );
      stepNrInFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "split" ) );
      partNrInFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "haspartno" ) );
      dateInFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "add_date" ) );
      timeInFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "add_time" ) );
      addToResult = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "AddToResult" ) );
      append = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "file", "append" ) );
      fileName = XMLHandler.getTagValue( stepnode, "file", "name" );
      fileNameInField = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "fileNameInField" ) );
      fileNameField = XMLHandler.getTagValue( stepnode, "fileNameField" );

    } catch ( Exception e ) {
      throw new KettleXMLException( "Unable to load step info from XML", e );
    }
  }

  @Override
  public void setDefault() {
    append = false;
    createparentfolder = false;
    // Items ...
    keyfield = null;
    valuefield = null;
    comment = null;
  }

  @Override
  public String getXML() {
    StringBuilder retval = new StringBuilder();

    // Items ...

View on GitHub (pinned to f3058517a1)