{"record":{"id":"0dcfdd1a9cbdc86b","repo":"pentaho/pentaho-kettle","slug":"salesforceupdatemeta-exception-errorsavingtorepository","errorCode":null,"errorMessage":"SalesforceUpdateMeta.Exception.ErrorSavingToRepository","messagePattern":"SalesforceUpdateMeta\\.Exception\\.ErrorSavingToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdateMeta.java","lineNumber":285,"sourceCode":"        PKG, \"SalesforceUpdateMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    super.saveRep( rep, metaStore, id_transformation, id_step );\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"batchSize\", getBatchSize() );\n\n      for ( int i = 0; i < updateLookup.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", getUpdateLookup()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_attribut\", getUpdateStream()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_useExternalId\", getUseExternalId()[i]\n          .booleanValue() );\n\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"rollbackAllChangesOnError\", isRollbackAllChangesOnError() );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SalesforceUpdateMeta.Exception.ErrorSavingToRepository\", \"\" + id_step ), e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    super.check( remarks, transMeta, stepMeta, prev, input, output, info, space, repository, metaStore );\n    CheckResult cr;\n\n    // See if we get input...\n    if ( input != null && input.length > 0 ) {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(\n          PKG, \"SalesforceUpdateMeta.CheckResult.NoInputExpected\" ), stepMeta );\n    } else {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdateMeta.java#L267-L303","documentation":"This KettleException wraps any failure while persisting the Salesforce Update step's configuration to the Pentaho repository in saveRep. Every rep.saveStepAttribute call is inside a try/catch; a failure (dead repository connection, read-only repository, constraint violation) is rethrown with this message including the id_step. The step's settings are then not saved.","triggerScenarios":"Calling saveRep (e.g. when the user clicks Save in Spoon) while the Repository saveStepAttribute calls throw — repository connection lost, repository read-only/quota exceeded, database constraint violation, id_transformation/id_step invalid.","commonSituations":"Saving a transformation when the database repository session has expired; repository DB out of disk space or locked by backups; sharing a transformation across repositories with incompatible schemas.","solutions":["Inspect the chained cause for the real database/repository error and address it (reconnect, free space, unlock).","Re-save the transformation after confirming the repository connection is alive.","If the repository is read-only, switch to a writable repository or export to a .ktr file instead.","Retry the save once — transient connection drops are a common cause."],"exampleFix":"// before\nstepMeta.getStepMetaInterface().saveRep(repository, metaStore, transMeta.getObjectId(), stepMeta.getObjectId());\n// after\ntry {\n  stepMeta.getStepMetaInterface().saveRep(repository, metaStore, transMeta.getObjectId(), stepMeta.getObjectId());\n} catch (KettleException e) {\n  logError(\"Save failed, attempting repository reconnect\");\n  repository.connect();\n  stepMeta.getStepMetaInterface().saveRep(repository, metaStore, transMeta.getObjectId(), stepMeta.getObjectId());\n}","handlingStrategy":"try-catch","validationCode":"if (!repository.isConnected()) repository.connect(); // verify before save","typeGuard":null,"tryCatchPattern":"try { meta.saveRep(rep, metaStore, idTrans, idStep); } catch (KettleException e) { log.error(\"ErrorSavingToRepository for step \" + idStep + \", cause: \" + e.getCause(), e); throw e; }","preventionTips":["Save regularly and verify repository quota/disk space","Reconnect stale repository sessions before long editing sessions","Avoid saving while repository maintenance/backup locks are running"],"tags":["pentaho","kettle","repository","salesforce","metadata"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}