pentaho/pentaho-kettle · error · KettleException

AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo

AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo

Error message

AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo

What it means

AggregateRowsMeta.readRep loads the step's configuration from a repository (database) instead of XML and throws KettleException with this localized message when repository attribute reads fail. It indicates the step metadata could not be reconstructed from stored repository attributes.

Solutions

  1. Check repository database connectivity and credentials; retest the load.
  2. Open the transformation in Spoon, verify the Aggregate Rows step config, and re-save to rewrite repository attributes.
  3. Inspect the wrapped KettleException cause for the underlying database error.
  4. After a PDI upgrade, run the repository upgrade/migration scripts before loading transformations.

Example fix

// before
TransMeta transMeta = new TransMeta(rep, "myTrans", repoDir); // KettleException on bad repo rows
// after
try {
  TransMeta transMeta = new TransMeta(rep, "myTrans", repoDir);
} catch (KettleException e) {
  log.error("Step info unreadable from repository: " + e.getCause());
  // fix repo connectivity or re-save the step in Spoon, then retry
}
Defensive patterns

Strategy: retry

Validate before calling

// Verify repository connectivity before loading
if (!rep.connect(...)) throw new IllegalStateException("Repository unavailable");

Try / catch

try {
  meta.readRep(rep, ...);
} catch (KettleException e) {
  logger.error("Repository read failed: " + e.getCause(), e);
  // check DB connectivity / re-save step in Spoon, then retry once
}

Prevention

When it happens

Trigger: readRep is called while the repository connection fails mid-query, rep.getStepAttributeString throws a database error, or stored field_type values cannot be mapped by getType.

Common situations: Repository database unavailable or schema mismatch after a PDI upgrade; corrupted repository rows for the step; concurrent modification of the transformation while loading.

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/0effbee817e1a317. Report an issue: GitHub.

Appendix: source

Thrown at plugins/aggregate-rows/core/src/main/java/org/pentaho/di/trans/steps/aggregaterows/AggregateRowsMeta.java:285

    return retval.toString();
  }

  @Override
  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" );
        fieldNewName[i] = rep.getStepAttributeString( id_step, i, "field_rename" );
        aggregateType[i] = getType( rep.getStepAttributeString( id_step, i, "field_type" ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo" ), e );
    }

  }

  @Override
  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_rename", fieldNewName[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type", getTypeDesc( aggregateType[i] ) );
      }
    } catch ( KettleException e ) {
      throw new KettleException( BaseMessages.getString( PKG, "AggregateRowsMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

View on GitHub (pinned to f3058517a1)