pentaho/pentaho-kettle · error · KettleException

Unexpected error reading step with id_step=

Error message

Unexpected error reading step with id_step=<id_step> from the repository

What it means

The generic catch-all in DummyPluginMeta.readRep: any non-database exception during repository deserialization (ValueMetaFactory.getIdForValueMeta on an unknown type name, ClassCastException/NPE on malformed attributes, convertData failing on the stored text) is wrapped as 'Unexpected error reading step...'. It is distinct from the KettleDatabaseException branch and indicates data/format problems rather than connectivity.

Solutions

  1. Inspect the chained exception's cause — for unknown types it names the offending type descriptor.
  2. Query the repository: SELECT * FROM R_STEP_ATTRIBUTE WHERE ID_STEP=<id_step> and check value_name/value_type/value_text for nulls or bad values.
  3. Correct the stored attributes (fix value_type to a valid descriptor like 'Number'/'String', or value_text to a parseable value) or recreate the step.
  4. Check for PDI version mismatch: if the transformation was saved by a newer version, load it with the matching PDI version.

Example fix

// before: corrupt repository row
value_type = 'Nmbr', value_text = 'abc'
// after: valid attributes
value_type = 'Number', value_text = '123.456'
Defensive patterns

Strategy: validation

Validate before calling

// validate the stored attributes before calling readRep
String typedesc = rep.getStepAttributeString( id_step, 0, "value_type" );
int type = ValueMetaFactory.getIdForValueMeta( typedesc );
if ( type < 0 ) {
  throw new IllegalStateException( "Unknown value_type stored: " + typedesc );
}

Try / catch

try {
  meta.readRep( rep, id_step, databases, counters );
} catch ( KettleException e ) {
  if ( !( e.getCause() instanceof KettleDatabaseException ) ) {
    // data/format problem: inspect R_STEP_ATTRIBUTE rows for id_step
    logError( "Corrupt step attributes for id_step=" + id_step + ": " + e.getCause() );
  }
  throw e;
}

Prevention

When it happens

Trigger: readRep encountering a stored value_type string that ValueMetaFactory.getIdForValueMeta cannot resolve (unknown/renamed type descriptor), a null value_name, or stored value_text that value.getValueMeta().convertData(stringMeta, text) cannot convert to the stored type (e.g. 'abc' in a Number field).

Common situations: Repository rows written by an older PDI version whose type descriptions changed; someone edited step attributes directly in the repository DB; a value_type stored as empty string after a failed save.

Related errors


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

Appendix: source

Thrown at plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java:163

      int type = ValueMetaFactory.getIdForValueMeta( typedesc );
      value = new ValueMetaAndData( new ValueMeta( name, type ), null );
      value.getValueMeta().setLength( length );
      value.getValueMeta().setPrecision( precision );

      if ( isnull ) {
        value.setValueData( null );
      } else {
        ValueMetaInterface stringMeta = new ValueMetaString( name );
        if ( type != ValueMetaInterface.TYPE_STRING ) {
          text = Const.trim( text );
        }
        value.setValueData( value.getValueMeta().convertData( stringMeta, text ) );
      }
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "error reading step with id_step=" + id_step + " from the repository", dbe );
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step with id_step=" + id_step + " from the repository", e );
    }
  }

  @Override
  public void saveRep( Repository rep, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "value_name", value.getValueMeta().getName() );
      rep.saveStepAttribute( id_transformation, id_step, 0, "value_type", value.getValueMeta().getTypeDesc() );
      rep.saveStepAttribute( id_transformation, id_step, 0, "value_text", value.getValueMeta().getString( value.getValueData() ) );
      rep.saveStepAttribute( id_transformation, id_step, 0, "value_null", value.getValueMeta().isNull( value.getValueData() ) );
      rep.saveStepAttribute( id_transformation, id_step, 0, "value_length", value.getValueMeta().getLength() );
      rep.saveStepAttribute( id_transformation, id_step, 0, "value_precision", value.getValueMeta().getPrecision() );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to save step information to the repository, id_step=" + id_step, dbe );
    }
  }

  @Override

View on GitHub (pinned to f3058517a1)