pentaho/pentaho-kettle · error · KettleXMLException

MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML

MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML

Error message

MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML

What it means

readData() - called by loadXML() when deserializing the step from a transformation file - wraps any Exception encountered while parsing the step's XML nodes into a KettleXMLException whose message is the resource key MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML. It means the step's XML fragment could not be converted back into field definitions.

Solutions

  1. Open the .ktr in Spoon and inspect the step's XML (right-click > Edit) for malformed <fields> entries
  2. Check the wrapped cause for the exact parse failure (e.g. NumberFormatException naming the bad attribute)
  3. Restore the step from a backup or re-add and reconfigure the step in the transformation
  4. Ensure the file was saved by the same/major-compatible Kettle version

Example fix

// before: hand-edited field node missing numeric attribute
<field><name>col1</name></field>
// after: regenerate via Spoon so required attributes are present
<field><name>col1</name><field_table>col1</field_table><field_stream>col1</field_stream><field_format_ok>Y</field_format_ok></field>
Defensive patterns

Strategy: try-catch

Validate before calling

// validate the step XML before loadXML
Node stepNode = XMLHandler.getSubNode( transformNode, "fields" );
if ( stepNode == null ) throw new KettleXMLException( "Missing <fields> section" );
// and verify numeric attributes parse before readData

Type guard

boolean validStepXml( Node n ) { return n != null && XMLHandler.getSubNode( n, "fields" ) != null; }

Try / catch

try { meta.loadXML( stepNode, databases, metaStore, variables ); } catch ( KettleXMLException e ) { log.error( "Cannot read MonetDB bulk loader step from XML", e.getCause() ); restore from backup or reconfigure step; }

Prevention

When it happens

Trigger: XMLHandler.getTagValue() or the field-parsing loop throws (e.g. NumberFormatException from parseInt/parse of attributes, missing/malformed 'fields' node, null vnode) while reading fieldTable/fieldStream entries from the saved step XML.

Common situations: Transformation file edited by hand or corrupted; the .ktr was written by a different Pentaho/Kettle version whose step XML layout changed; truncated or invalid XML for the <fields> section.

Related errors


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

Appendix: source

Thrown at plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java:346

      // Old functionality. Always commented out. It may be safe to remove all of th
      // autoSchema = "Y".equals(XMLHandler.getTagValue(stepnode, "auto_schema"));
      // autoStringWidths = "Y".equals(XMLHandler.getTagValue(stepnode, "auto_string_widths"));

      int nrvalues = XMLHandler.countNodes( stepnode, "mapping" );
      allocate( nrvalues );

      for ( int i = 0; i < nrvalues; i++ ) {
        Node vnode = XMLHandler.getSubNodeByNr( stepnode, "mapping", i );

        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!
        }
        fieldFormatOk[i] = "Y".equalsIgnoreCase( XMLHandler.getTagValue( vnode, "field_format_ok" ) );
      }
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
          PKG, "MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML" ), e );
    }
  }

  public void setDefault() {
    fieldTable = null;
    databaseMeta = null;
    schemaName = "";
    tableName = BaseMessages.getString( PKG, "MonetDBBulkLoaderMeta.DefaultTableName" );
    bufferSize = "100000";
    logFile = "";
    truncate = false;
    fullyQuoteSQL = true;

    // MonetDB safe defaults.
    fieldSeparator = "|";
    fieldEnclosure = "\"";
    NULLrepresentation = "";

View on GitHub (pinned to f3058517a1)