{"record":{"id":"a7cb30894bdd807e","repo":"pentaho/pentaho-kettle","slug":"salesforcedeletemeta-exception-errorsavingtorepository","errorCode":null,"errorMessage":"SalesforceDeleteMeta.Exception.ErrorSavingToRepository","messagePattern":"SalesforceDeleteMeta\\.Exception\\.ErrorSavingToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDeleteMeta.java","lineNumber":181,"sourceCode":"    super.readRep( rep, metaStore, id_step, databases );\n    try {\n      setDeleteField( rep.getStepAttributeString( id_step, \"DeleteField\" ) );\n      setBatchSize( rep.getStepAttributeString( id_step, \"batchSize\" ) );\n      setRollbackAllChangesOnError( rep.getStepAttributeBoolean( id_step, \"rollbackAllChangesOnError\" ) );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SalesforceDeleteMeta.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      rep.saveStepAttribute( id_transformation, id_step, \"DeleteField\", getDeleteField() );\n      rep.saveStepAttribute( id_transformation, id_step, \"rollbackAllChangesOnError\", isRollbackAllChangesOnError() );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SalesforceDeleteMeta.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, \"SalesforceDeleteMeta.CheckResult.NoInputExpected\" ), stepMeta );\n    } else {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDeleteMeta.java#L163-L199","documentation":"SalesforceDeleteMeta.saveRep persists the step's settings (batchSize, DeleteField, rollbackAllChangesOnError) to the repository and wraps any exception in a KettleException with this message, including the step's ObjectId. It means saving the step attributes to the repository database failed.","triggerScenarios":"saveRep catching an exception from rep.saveStepAttribute calls: repository connection lost, transaction failure, constraint violation, or read-only repository.","commonSituations":"Repository database read-only or out of space; network interruption mid-save; repository lock held by another user/session; permission denied on the repository tables.","solutions":["Verify the repository database is writable and the user has INSERT/UPDATE permissions on the step attribute tables","Retry saving the transformation after confirming the database connection is stable","Check for repository locks (other sessions holding the transformation) and resolve them","Inspect the chained cause for the specific JDBC error (constraint, disk full, timeout)"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"// verify the repository is writable before saving\nif (repository.isReadOnly()) { throw new IllegalStateException(\"Repository is read-only; cannot save step attributes\"); }","typeGuard":null,"tryCatchPattern":"try {\n  meta.saveRep(repository, metaStore, transId, stepId);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ErrorSavingToRepository\")) {\n    logError(\"Repository save failed for step \" + stepId + \"; cause: \" + e.getCause());\n  }\n  throw e;\n}","preventionTips":["Ensure the repository DB user has INSERT/UPDATE privileges on step attribute tables","Check for other sessions holding locks on the transformation before saving","Monitor database disk space and transaction log growth","Save frequently and commit small changes to limit transaction scope"],"tags":["repository","persistence","salesforce-delete","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"}