pentaho/pentaho-kettle · error · KettleException

GroupByMeta.Exception.UnableToSaveStepInfoToRepository

GroupByMeta.Exception.UnableToSaveStepInfoToRepository

Error message

GroupByMeta.Exception.UnableToSaveStepInfoToRepository

What it means

Despite the method label, this throw sits in saveRep (repository save path): GroupByMeta wraps failures while persisting the step's attributes into the Pentaho repository in this KettleException. Saving the GroupBy step definition failed.

Solutions

  1. Check repository DB connectivity and re-save the transformation
  2. Verify the repository user has write privileges
  3. Inspect the wrapped cause for the SQL/database error
  4. Save the transformation as a local .ktr file as a workaround, then retry the repository save
  5. Run repository integrity/upgrade scripts if the schema is outdated
Defensive patterns

Strategy: try-catch

Validate before calling

// check write access before saveRep
if ( repository.isReadOnly() != null && repository.isReadOnly() ) {
  throw new IllegalStateException( "Repository is read-only" );
}

Try / catch

try {
  repository.save( transMeta, "initial version", null, true );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "UnableToSaveStepInfoToRepository" ) ) {
    log.error( "GroupBy save failed; inspect cause for SQL error, retry or save locally", e.getCause() );
    transMeta.saveToFile( File.createTempFile( "fallback", ".ktr" ), "utf-8" );
  } else { throw e; }
}

Prevention

When it happens

Trigger: saveRep calls rep.saveStepAttribute(...) for fields like group_field, aggregate_name, aggregate_type; the repository is read-only, the connection drops, or a constraint fails, throwing an exception that is wrapped with id_step appended.

Common situations: Repository database down or network blip mid-save; read-only or locked repository user; transaction rollback from a DB constraint; saving to a repository in maintenance mode.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/groupby/GroupByMeta.java:669

      rep.saveStepAttribute( id_transformation, id_step, "field_ignore", aggregateIgnoredField );
      rep.saveStepAttribute( id_transformation, id_step, "directory", directory );
      rep.saveStepAttribute( id_transformation, id_step, "prefix", prefix );
      rep.saveStepAttribute( id_transformation, id_step, "add_linenr", addingLineNrInGroup );
      rep.saveStepAttribute( id_transformation, id_step, "linenr_fieldname", lineNrInGroupField );
      rep.saveStepAttribute( id_transformation, id_step, "give_back_row", alwaysGivingBackOneRow );

      for ( int i = 0; i < groupField.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "group_name", groupField[ i ] );
      }

      for ( int i = 0; i < subjectField.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_name", aggregateField[ i ] );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_subject", subjectField[ i ] );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_type", getTypeDesc( aggregateType[ i ] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_value_field", valueField[ i ] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "GroupByMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );
    }
  }

  @Override
  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                     RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                     Repository repository, IMetaStore metaStore ) {
    CheckResult cr;

    if ( input.length > 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "GroupByMeta.CheckResult.ReceivingInfoOK" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =

View on GitHub (pinned to f3058517a1)