pentaho/pentaho-kettle · error · KettleXMLException

DeleteMeta.Exception.UnableToReadStepInfoFromXML

DeleteMeta.Exception.UnableToReadStepInfoFromXML

Error message

DeleteMeta.Exception.UnableToReadStepInfoFromXML

What it means

DeleteMeta.loadXML reads the step's definition from a .ktr XML file via readData. Any exception while parsing (missing/malformed nodes, unexpected structure) is wrapped in a KettleXMLException with this generic message, with the original cause attached. It signals the Delete step's XML block could not be deserialized.

Solutions

  1. Inspect the cause chain of the KettleXMLException to find the exact parse failure.
  2. Open the .ktr file and verify the Delete step XML block is complete and well-formed (all expected tags present).
  3. Recreate the Delete step in Spoon and re-save the transformation to regenerate valid XML.
  4. Align versions: open and re-save the transformation in the same Pentaho version used in production.

Example fix

// before (corrupt fragment)
<delete><connection>DB</connection>
// after (complete block regenerated by Spoon)
<delete><connection>DB</connection><schema/><table>CUSTOMERS</table><fields>...</fields></delete>
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate XML before loading
DocumentBuilderFactory.newInstance().newDocumentBuilder()
  .parse(new InputSource(new StringReader(ktrXml))); // well-formed check

Try / catch

try { transMeta.loadXml(file); } catch (KettleXMLException e) {
  log.error("Failed to load Delete step XML: {}", e.getCause(), e);
}

Prevention

When it happens

Trigger: loadXML -> readData encounters Exception while reading the <delete> step XML (e.g. XMLHandler.getTagValue on missing/corrupt nodes, class-cast or number-format issues in the XML).

Common situations: Hand-edited or truncated .ktr file; transformation produced by a newer/older Pentaho version with a different XML schema; copy-paste of a step XML fragment that is malformed; encoding corruption.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java:241

      Node lookup = XMLHandler.getSubNode( stepnode, TAG_LOOKUP );
      nrkeys = XMLHandler.countNodes( lookup, TAG_KEY );

      allocate( nrkeys );

      for ( int i = 0; i < nrkeys; i++ ) {
        Node knode = XMLHandler.getSubNodeByNr( lookup, TAG_KEY, i );

        keyFields[i].setKeyStream( XMLHandler.getTagValue( knode, TAG_NAME ) );
        keyFields[i].setKeyLookup( XMLHandler.getTagValue( knode, TAG_FIELD ) );
        keyFields[i].setKeyCondition( XMLHandler.getTagValue( knode, TAG_CONDITION ) );
        if ( keyFields[i].getKeyCondition() == null ) {
          keyFields[i].setKeyCondition( "=" );
        }
        keyFields[i].setKeyStream2( XMLHandler.getTagValue( knode, TAG_NAME2 ) );
      }

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

  public void setDefault() {
    databaseMeta = null;
    commitSize = "100";
    schemaName = "";
    tableName = BaseMessages.getString( PKG, "DeleteMeta.DefaultTableName.Label" );

    int nrkeys = 0;

    allocate( nrkeys );
  }

  public String getXML() {
    StringBuilder retval = new StringBuilder( 500 );

View on GitHub (pinned to f3058517a1)