pentaho/pentaho-kettle · error · KettleException

SalesforceInsertMeta.Exception.ErrorSavingToRepository

Error message

SalesforceInsertMeta.Exception.ErrorSavingToRepository

What it means

SalesforceInsertMeta.saveRep() persists the step's attributes to the Kettle repository. On any failure writing those attributes it throws a KettleException keyed 'SalesforceInsertMeta.Exception.ErrorSavingToRepository' including the id_step. The original exception (SQL error, constraint violation, connection loss) is chained as the cause.

Solutions

  1. Check the chained cause for the underlying SQL/database error code and message.
  2. Verify the repository DB user has write privileges and the schema is current for your PDI version.
  3. Retry the save after confirming no concurrent modification of the same transformation.
  4. As a workaround, export the transformation to a .ktr file and store it in version control instead of the repository.
Defensive patterns

Strategy: try-catch

Validate before calling

// Check write access before saving
try (Connection c = repoDataSource.getConnection()) {
  DatabaseMetaData md = c.getMetaData();
  if (!md.updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)) { /* warn */ }
}

Try / catch

try {
  transMeta.saveMetaStoreProperties(repository, metaStore);
} catch (KettleException e) {
  if (e.getCause() instanceof SQLException) {
    log.error("Repository write failed: {}", e.getCause().getMessage());
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling saveRep (i.e., saving a transformation containing a Salesforce Insert step to a repository) when rep.saveStepAttribute throws: repository DB read-only, connection dropped mid-save, unique-key conflict on r_step_attribute, or value exceeding column size.

Common situations: Repository DB out of disk space or locked by another process; concurrent saves of the same transformation; repository schema not upgraded after a PDI upgrade; database user lacking INSERT/UPDATE privileges.

Related errors


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

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsertMeta.java:309

    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    super.saveRep( rep, metaStore, id_transformation, id_step );
    try {
      rep.saveStepAttribute( id_transformation, id_step, "batchSize", getBatchSize() );
      rep.saveStepAttribute( id_transformation, id_step, "salesforceIDFieldName", getSalesforceIDFieldName() );

      for ( int i = 0; i < updateLookup.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", getUpdateLookup()[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_attribut", getUpdateStream()[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_useExternalId", getUseExternalId()[i]
          .booleanValue() );

      }
      rep.saveStepAttribute( id_transformation, id_step, "rollbackAllChangesOnError", isRollbackAllChangesOnError() );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SalesforceInsertMeta.Exception.ErrorSavingToRepository", "" + id_step ), e );
    }
  }

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

    // See if we get input...
    if ( input != null && input.length > 0 ) {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(
          PKG, "SalesforceInsertMeta.CheckResult.NoInputExpected" ), stepMeta );
    } else {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(

View on GitHub (pinned to f3058517a1)