pentaho/pentaho-kettle · error · KettleException

GPBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository

Error message

GPBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository

What it means

Thrown by GPBulkLoaderMeta.saveRep when persisting the step's settings to the Kettle repository fails. Saving field mappings, database relation (insertStepDatabase) and other attributes is wrapped in a try/catch and rethrown as this KettleException with the step id appended to the message. The original exception is chained as the cause.

Solutions

  1. Inspect getCause() for the underlying repository error (most often insertStepDatabase or write failure)
  2. Ensure the referenced database connection is saved in the repository before saving the transformation
  3. Verify repository user has INSERT/UPDATE rights on the step attribute tables
  4. Retry the save after reconnecting; avoid two users saving the same transformation concurrently
Defensive patterns

Strategy: try-catch

Validate before calling

// before saving
if ( databaseMeta != null && databaseMeta.getObjectId() == null ) {
  rep.save( databaseMeta, null, metaStore ); // save connection first
}

Type guard

boolean canSave = rep != null && rep.isConnected() && (databaseMeta == null || databaseMeta.getObjectId() != null);

Try / catch

try { meta.saveRep( rep, metaStore, id_transformation, id_step ); } catch ( KettleException e ) { log.error( "Step save failed for step " + id_step + ": " + e.getCause(), e ); }

Prevention

When it happens

Trigger: Calling saveRep (during transformation save) when insertStepDatabase fails due to a foreign-key violation, repository connection loss, or the referenced databaseMeta object not yet being saved (null ObjectId).

Common situations: Saving a transformation whose database connection was deleted from the repository; read-only repository credentials; duplicate/insert conflicts in r_step_database after concurrent saves by two Spoon sessions.

Related errors


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

Appendix: source

Thrown at plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java:412

      rep.saveStepAttribute( id_transformation, id_step, "data_file", dataFile );
      rep.saveStepAttribute( id_transformation, id_step, "log_file", logFile );

      rep.saveStepAttribute( id_transformation, id_step, "erase_files", eraseFiles );
      rep.saveStepAttribute( id_transformation, id_step, "encoding", encoding );
      rep.saveStepAttribute( id_transformation, id_step, "dbname_override", dbNameOverride );

      for ( int i = 0; i < fieldTable.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "stream_name", fieldTable[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "date_mask", dateMask[i] );
      }

      // Also, save the step-database relationship!
      if ( databaseMeta != null ) {
        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "GPBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );
    }
  }

  @Override
  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    // Default: nothing changes to rowMeta
  }

  @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;
    String error_message = "";

View on GitHub (pinned to f3058517a1)