pentaho/pentaho-kettle · error · KettleException
SalesforceUpsertMeta.Exception.ErrorSavingToRepository
Error message
SalesforceUpsertMeta.Exception.ErrorSavingToRepository
What it means
This KettleException is thrown by SalesforceUpsertMeta.saveRep() when any repository write (saveStepAttribute) for this step's metadata fails. It wraps the underlying exception and includes the id_step of the step being saved, so a transformation save to a repository (database or file-based) is aborted.
Solutions
- Check the wrapped cause 'e' to find the real repository error (connection, permissions, schema).
- Verify the Kettle repository (DB or file) is reachable and the connected user has write rights on r_step_attribute.
- If using a DB repository, check the repository tables exist and aren't locked/corrupted; run repository repair/upgrade tools if needed.
- Re-open and re-save the step in Spoon to regenerate consistent metadata arrays.
- As a last resort, export the transformation to XML and re-import into a fresh repository.
Example fix
// before
rep.saveStepAttribute( id_transformation, id_step, "rollbackAllChangesOnError", isRollbackAllChangesOnError() );
// after — ensure repository is connected before saving
if ( rep != null && rep.isConnected() ) {
rep.saveStepAttribute( id_transformation, id_step, "rollbackAllChangesOnError", isRollbackAllChangesOnError() );
} Defensive patterns
Strategy: try-catch
Validate before calling
// before saving
if ( rep == null || !rep.isConnected() ) { throw new KettleException("Repository not connected"); }
if ( getUpdateLookup() != null && getUseExternalId() != null && getUseExternalId().length != getUpdateLookup().length ) {
throw new KettleException("Field metadata arrays out of sync");
} Try / catch
try { saveRep(...); } catch ( KettleException e ) { logError("Repository save failed for id_step=" + id_step + ": " + e.getCause(), e); throw e; } Prevention
- Always check repository connectivity before batch saves.
- Keep field arrays (lookup, useExternalId, etc.) in sync when editing step metadata.
- Use repository health checks / upgrade tools after PDI version upgrades.
- Wrap repository saves with retry for transient DB issues.
When it happens
Trigger: Any Exception while calling rep.saveStepAttribute during saveRep — e.g. repository connection lost mid-save, schema/table missing or locked, constraint violation writing the step attribute rows, or a null/invalid attribute array (getUseExternalId() with fewer entries than field count).
Common situations: Saving a transformation with a Salesforce Upsert step when the repository database went down or the user lost permissions; corrupted repository metadata tables; mismatch between saved field count arrays after editing the step.
Related errors
- SalesforceInsertMeta.Exception.ErrorSavingToRepository
- AddSequenceMeta.Exception.UnableToSaveStepInfo
- ColumnExistsMeta.Exception.UnableToSaveStepInfo
- ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo
- CreditCardValidatorMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/34c9e1c65e6c6085.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupsert/SalesforceUpsertMeta.java:332
}
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, "upsertfield", getUpsertField() );
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, "SalesforceUpsertMeta.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, "SalesforceUpsertMeta.CheckResult.NoInputExpected" ), stepMeta );
} else {
cr =
new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(View on GitHub (pinned to f3058517a1)