{"record":{"id":"c92932e96ec2045f","repo":"pentaho/pentaho-kettle","slug":"salesforceinsertmeta-exception-errorreadingrepository","errorCode":null,"errorMessage":"SalesforceInsertMeta.Exception.ErrorReadingRepository","messagePattern":"SalesforceInsertMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsertMeta.java","lineNumber":289,"sourceCode":"  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    super.readRep( rep, metaStore, id_step, databases );\n    try {\n      setBatchSize( rep.getStepAttributeString( id_step, \"batchSize\" ) );\n      setSalesforceIDFieldName( rep.getStepAttributeString( id_step, \"salesforceIDFieldName\" ) );\n      int nrFields = rep.countNrStepAttributes( id_step, \"field_name\" );\n      allocate( nrFields );\n\n      for ( int i = 0; i < nrFields; i++ ) {\n        updateLookup[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        updateStream[i] = rep.getStepAttributeString( id_step, i, \"field_attribut\" );\n        useExternalId[i] =\n          Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, \"field_useExternalId\", false ) );\n      }\n      setRollbackAllChangesOnError( rep.getStepAttributeBoolean( id_step, \"rollbackAllChangesOnError\" ) );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SalesforceInsertMeta.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, \"salesforceIDFieldName\", getSalesforceIDFieldName() );\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() );","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsertMeta.java#L271-L307","documentation":"SalesforceInsertMeta.readRep() loads the step's settings from the Kettle repository (database) instead of XML. Any exception while reading step attributes — repository connectivity, missing row, schema mismatch — is rethrown as a KettleException with the localized message key 'SalesforceInsertMeta.Exception.ErrorReadingRepository'. The real cause is chained.","triggerScenarios":"Loading a Salesforce Insert step's metadata via Repository (loadTransMeta / StepMeta from repository) when rep.getStepAttributeString/Boolean throws: repository database down, KETTLE_* tables missing or out of schema, or the id_step no longer exists.","commonSituations":"Repository database upgraded/migrated with stale r_step_attribute schema; transformation deleted by another user while being loaded; network interruption to the repository DB; corrupted repository row for the step.","solutions":["Inspect the chained cause to see whether it is a database connection, SQL, or missing-row error.","Verify the Kettle repository database is reachable and its schema (r_step_attribute etc.) matches the PDI version.","Re-open the transformation in Spoon to confirm the step row still exists; re-save the step to regenerate its attributes.","If the repository is corrupted, restore from backup or re-create the transformation in a fresh repository."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify repository connectivity before loading metadata\ntry (Connection c = repoDataSource.getConnection()) {\n  if (!c.isValid(5)) throw new IllegalStateException(\"Repository DB unreachable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = repository.loadTransformation(transObjectId, null);\n} catch (KettleException e) {\n  Throwable cause = e.getCause();\n  if (cause instanceof SQLException) {\n    // handle repository DB problem: check connectivity/schema\n  }\n  throw e;\n}","preventionTips":["Check repository DB availability before batch metadata loads.","Keep the Kettle repository schema upgraded to match your PDI version.","Avoid concurrent edits/saves of the same transformation.","Back up the repository before migrations."],"tags":["kettle","repository","metadata","salesforce"],"backgroundTag":"database-query-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"}