pentaho/pentaho-kettle · error · KettleXMLException

SymmetricCryptoTransMeta.Exception.UnableToLoadStepInfoFromXML

SymmetricCryptoTransMeta.Exception.UnableToLoadStepInfoFromXML

Error message

SymmetricCryptoTransMeta.Exception.UnableToLoadStepInfoFromXML

What it means

SymmetricCryptoTransMeta.readData() (called by loadXML) parses the step's XML node (fields like secretKey, secretKeyInField, readKeyAsBinary, outputResultAsBinary). Any exception during parsing is wrapped in a KettleXMLException with this message, meaning the step's configuration could not be loaded from the transformation XML. The original cause is attached.

Solutions

  1. Open the .ktr file and check/repair the XML for this step's node (fields, secretKey, secretKeyInField, etc.).
  2. Recreate the Symmetric Crypto step in Spoon and re-save the transformation.
  3. Restore the transformation from backup/version control.
  4. Load with the same or newer PDI version that originally saved the file.

Example fix

// before
<secretKeyInField>yes</secretKeyInField> <!-- hand-edited tag broken -->
// after
<secretKeyInField>Y</secretKeyInField>
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate the step XML node before loadXML
Node stepnode = XMLHandler.getSubNode(transNode, "step");
if (stepnode == null || XMLHandler.getTagValue(stepnode, "type") == null) {
  throw new IllegalArgumentException("Corrupt step node in transformation XML");
}

Try / catch

try {
  TransMeta tm = new TransMeta("mytrans.ktr");
} catch (KettleXMLException e) {
  logError("Could not load step info from XML: " + e.getCause(), e);
  // fall back to backup file or recreate the step
}

Prevention

When it happens

Trigger: loadXML is given a malformed or unexpected <step> node: missing/invalid XML tags, corrupted file, an XMLHandler parse error, or a manually edited transformation file with invalid content for this step.

Common situations: Hand-editing a .ktr file and breaking tags; version migration where XML structure changed; truncated/corrupted transformation file from a bad transfer; XML node from a newer PDI version read by an older one.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTransMeta.java:271

  }

  private void readData( Node stepnode ) throws KettleXMLException {
    try {
      operationType =
        getOperationTypeByCode( Const.NVL( XMLHandler.getTagValue( stepnode, "operation_type" ), "" ) );
      algorithm = XMLHandler.getTagValue( stepnode, "algorithm" );
      schema = XMLHandler.getTagValue( stepnode, "schema" );
      secretKeyField = XMLHandler.getTagValue( stepnode, "secretKeyField" );
      messageField = XMLHandler.getTagValue( stepnode, "messageField" );
      resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" );

      setSecretKey( Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( stepnode, "secretKey" ) ) );
      secretKeyInField = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "secretKeyInField" ) );
      readKeyAsBinary = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "readKeyAsBinary" ) );
      outputResultAsBinary = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "outputResultAsBinary" ) );

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

  public void setDefault() {
    secretKeyField = null;
    messageField = null;
    resultfieldname = "result";
    secretKey = null;
    secretKeyInField = false;
    operationType = OPERATION_TYPE_ENCRYPT;
    algorithm = SymmetricCryptoMeta.TYPE_ALGORYTHM_CODE[0];
    schema = algorithm;
    readKeyAsBinary = false;
    outputResultAsBinary = false;
  }

  @Override

View on GitHub (pinned to f3058517a1)