pentaho/pentaho-kettle · error · KettleXMLException

OraBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML

Error message

OraBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML

What it means

loadXML() parses the step's <fields> XML; any Exception during readData is wrapped in a KettleXMLException with the localized message for OraBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML. It means the step definition in the .ktr file is malformed or uses unexpected values.

Solutions

  1. Open the .ktr in Spoon and re-save/recreate the OraBulkLoader step to regenerate valid XML
  2. Diff the step's XML against a freshly created OraBulkLoader step to spot malformed attributes
  3. Restore the transformation from version control/backup if the XML was corrupted
  4. Check Pentaho version compatibility — old PDI files may need migration through an intermediate version

Example fix

// before
<fields>
  <field table="T" stream="1"/>
<!-- after -->
<fields>
  <field table="TARGET" stream_name="COL1" field_name="col1" date_mask=""/>
</fields>
Defensive patterns

Strategy: try-catch

Validate before calling

// sanity-check the step XML before loading
org.w3c.dom.Node fields = XMLHandler.getSubNode( stepNode, "fields" );
if ( fields == null || XMLHandler.getNodes( fields, "field" ).length == 0 ) {
  throw new IllegalArgumentException( "OraBulkLoader step has no <fields> section" );
}

Try / catch

try {
  meta.loadXML( stepnode, databases, metaStore );
} catch ( KettleXMLException e ) {
  if ( e.getMessage().contains( "UnableToReadStepInfoFromXML" ) ) {
    // fall back to re-creating the step or loading a backup .ktr
  }
}

Prevention

When it happens

Trigger: readData(Node) throws while reading stepNode attributes — e.g. missing/malformed <fields> node, non-numeric field count, null structures the parser does not expect, or any runtime exception in field mapping reconstruction.

Common situations: Hand-edited .ktr files; transformations produced by newer/older Pentaho versions with schema drift; truncated or corrupted XML after a failed save/merge in version control.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java:442

        fieldTable[i] = XMLHandler.getTagValue( vnode, "stream_name" );
        fieldStream[i] = XMLHandler.getTagValue( vnode, "field_name" );
        if ( fieldStream[i] == null ) {
          fieldStream[i] = fieldTable[i]; // default: the same name!
        }
        String locDateMask = XMLHandler.getTagValue( vnode, "date_mask" );
        if ( locDateMask == null ) {
          dateMask[i] = "";
        } else {
          if ( OraBulkLoaderMeta.DATE_MASK_DATE.equals( locDateMask )
            || OraBulkLoaderMeta.DATE_MASK_DATETIME.equals( locDateMask ) ) {
            dateMask[i] = locDateMask;
          } else {
            dateMask[i] = "";
          }
        }
      }
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "OraBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML" ), e );
    }
  }

  public void setDefault() {
    fieldTable = null;
    databaseMeta = null;
    commitSize = Integer.toString( DEFAULT_COMMIT_SIZE );
    bindSize = Integer.toString( DEFAULT_BIND_SIZE ); // Use platform default
    readSize = Integer.toString( DEFAULT_READ_SIZE ); // Use platform default
    maxErrors = Integer.toString( DEFAULT_MAX_ERRORS );
    schemaName = "";
    tableName = BaseMessages.getString( PKG, "OraBulkLoaderMeta.DefaultTableName" );
    loadMethod = METHOD_AUTO_END;
    loadAction = ACTION_APPEND;
    sqlldr = "sqlldr";
    controlFile = "control${Internal.Step.CopyNr}.cfg";
    dataFile = "load${Internal.Step.CopyNr}.dat";

View on GitHub (pinned to f3058517a1)