pentaho/pentaho-kettle · error · KettleXMLException

Unable to read step info from XML node

Error message

Unable to read step info from XML node

What it means

NumberRangeMeta.loadXML() parses the Number Range step's <rules> block from the step XML, converting lower_bound/upper_bound strings to doubles via Double.parseDouble and calling addRule. Any parse or structure failure is wrapped in a KettleXMLException with the hardcoded message 'Unable to read step info from XML node'.

Solutions

  1. Open the .ktr and check every Number Range rule has numeric lower_bound/upper_bound using '.' as the decimal separator.
  2. Fix non-numeric or locale-formatted bound values (e.g. '1,5' -> '1.5').
  3. Recreate the step in Spoon to regenerate valid XML, or restore the file from backup.
  4. Verify the file was not corrupted in transfer (encoding, truncation).

Example fix

// before
<rule><lower_bound>0,1</lower_bound><upper_bound>1</upper_bound><value>low</value></rule>
// after
<rule><lower_bound>0.1</lower_bound><upper_bound>1</upper_bound><value>low</value></rule>
Defensive patterns

Strategy: validation

Validate before calling

// Validate rule bounds are parseable doubles before load
try { Double.parseDouble(lowerBoundStr); Double.parseDouble(upperBoundStr); } catch (NumberFormatException e) { /* fix XML */ }

Type guard

boolean isParseableDouble(String s) { if (s == null) return false; try { Double.parseDouble(s.trim()); return true; } catch (NumberFormatException e) { return false; } }

Try / catch

try { meta.loadXML(stepNode, databases, metaStore); } catch (KettleXMLException e) { log.error("Number Range XML invalid: " + e.getCause(), e); }

Prevention

When it happens

Trigger: loadXML(stepNode) encountering a <rule> with non-numeric lower_bound/upper_bound text, or missing/malformed rule sub-nodes, throwing inside the try block.

Common situations: Hand-edited .ktr with a typo like lower_bound="0,,1"; locale-formatted decimal separators (comma instead of dot); XML from a different plugin version with a changed rule schema; truncated file.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/numberrange/NumberRangeMeta.java:141

      setFallBackValue( fallBackValue );

      Node fields = XMLHandler.getSubNode( stepnode, "rules" );
      int count = XMLHandler.countNodes( fields, "rule" );
      for ( int i = 0; i < count; i++ ) {

        Node fnode = XMLHandler.getSubNodeByNr( fields, "rule", i );

        String lowerBoundStr = XMLHandler.getTagValue( fnode, "lower_bound" );
        String upperBoundStr = XMLHandler.getTagValue( fnode, "upper_bound" );
        String value = XMLHandler.getTagValue( fnode, "value" );

        double lowerBound = Double.parseDouble( lowerBoundStr );
        double upperBound = Double.parseDouble( upperBoundStr );
        addRule( lowerBound, upperBound, value );
      }

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

  @Override
  public void setDefault() {
    emptyRules();
    setFallBackValue( "unknown" );
    addRule( -Double.MAX_VALUE, 5, "Less than 5" );
    addRule( 5, 10, "5-10" );
    addRule( 10, Double.MAX_VALUE, "More than 10" );
    inputField = "";
    outputField = "range";
  }

  @Override
  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      inputField = rep.getStepAttributeString( id_step, "inputField" );

View on GitHub (pinned to f3058517a1)