pentaho/pentaho-kettle · error · KettleException

RowsFromResultMeta.Exception.ErrorReadingStepInfoFromReposit…

Error message

RowsFromResultMeta.Exception.ErrorReadingStepInfoFromRepository

What it means

KettleException thrown by RowsFromResultMeta.readRep when reading per-field step attributes (field_name, field_type, field_length, field_precision) from the repository fails. Message comes from the localized bundle RowsFromResultMeta.Exception.ErrorReadingStepInfoFromRepository and wraps the underlying cause.

Solutions

  1. Read the wrapped cause; if it is a ValueMetaFactory error, fix the field_type attribute value in R_STEP_ATTRIBUTE to a valid value meta name.
  2. Check repository connectivity and retry loading the transformation.
  3. Verify the attribute rows for this id_step (attribute codes field_name/field_type/field_length/field_precision) are intact and consistently numbered.
  4. Re-create the step in Spoon and re-save to rebuild its repository attributes.

Example fix

// before: hand-inserted repository row with bad type
UPDATE R_STEP_ATTRIBUTE SET VALUE_STR='STRNG' WHERE CODE='field_type';
// after: use a valid ValueMeta name
UPDATE R_STEP_ATTRIBUTE SET VALUE_STR='String' WHERE CODE='field_type';
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate repository attribute rows before relying on readRep
String type = repository.getStepAttributeString(idStep, 0, "field_type");
if (type != null && ValueMetaFactory.getIdForValueMeta(type) < 0) {
  throw new IllegalStateException("Invalid field_type in repository: " + type);
}

Type guard

boolean hasFields = false;
for (int i = 0; repository.getStepAttributeString(idStep, i, "field_name") != null; i++) hasFields = true;
if (!hasFields) log.warn("No field rows found for id_step " + idStep);

Try / catch

try {
  meta.readRep(repository, metaStore, idStep, databases);
} catch (KettleException e) {
  log.error("Error reading RowsFromResult attributes: {}", e.getCause(), e);
  meta.setDefault(); // fall back to defaults instead of aborting
}

Prevention

When it happens

Trigger: readRep runs while loading a 'Get rows from result' step from a repository and rep.getStepAttributeString/Integer or ValueMetaFactory.getIdForValueMeta throws, including an unknown field_type name string that ValueMetaFactory cannot resolve.

Common situations: Repository rows edited manually so field_type holds a non-existent value type name; repository schema mismatch after Kettle upgrade; repository connection failure while iterating nrFields rows.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/rowsfromresult/RowsFromResultMeta.java:193

  }

  public void setDefault() {
    allocate( 0 );
  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
      allocate( nrfields );

      for ( int i = 0; i < nrfields; i++ ) {
        fieldname[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        type[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
        length[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
        precision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "RowsFromResultMeta.Exception.ErrorReadingStepInfoFromRepository" ), e );
    }

  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldname.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldname[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type",
          ValueMetaFactory.getValueMetaName( type[i] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_length", length[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_precision", precision[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "RowsFromResultMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );

View on GitHub (pinned to f3058517a1)