{"record":{"id":"fc77312dae424c78","repo":"pentaho/pentaho-kettle","slug":"salesforceupdatemeta-exception-errorreadingrepository","errorCode":null,"errorMessage":"SalesforceUpdateMeta.Exception.ErrorReadingRepository","messagePattern":"SalesforceUpdateMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdateMeta.java","lineNumber":266,"sourceCode":"\n  }\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      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, \"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 ) {","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdateMeta.java#L248-L284","documentation":"This KettleException wraps any failure that occurs while reading the Salesforce Update step's saved settings from the Pentaho repository (readRep). The repository (rep.getStepAttributeString/Boolean) is accessed inside a try/catch and any exception — repository down, bad ID, schema mismatch — is rethrown with this localized message and the original cause attached. It signals the step metadata could not be loaded, so the transformation cannot run.","triggerScenarios":"Calling readRep on SalesforceUpdateMeta when the underlying Repository getStepAttributeString/getStepAttributeBoolean calls throw — e.g. repository connection dropped mid-read, id_step not found in the repository, or repository schema/attribute tables inaccessible.","commonSituations":"Opening a transformation stored in a database repository whose connection has timed out; loading steps after a Pentaho repository upgrade that changed attribute storage; corrupt or partially migrated ktr metadata rows; running on a node with a misconfigured repository connection.","solutions":["Check the 'cause' chained exception for the real repository failure (connection refused, table missing, etc.) and fix that first.","Verify the Pentaho repository connection (host, credentials, database) is reachable before opening the transformation.","Confirm id_step and the transformation exist in the repository (rpartition/repository migration may have orphaned rows).","If repository corruption is suspected, re-save the step/transformation or rebuild the repository metadata tables."],"exampleFix":"// before\nSalesforceUpdateMeta meta = (SalesforceUpdateMeta) stepMeta.getStepMetaInterface();\nmeta.readRep(repository, metaStore, stepMeta.getObjectId(), null);\n// after\ntry {\n  meta.readRep(repository, metaStore, stepMeta.getObjectId(), null);\n} catch (KettleException e) {\n  logError(\"Repository read failed for Salesforce Update step\", e);\n  if (!repository.connect()) throw e; // reattach/reconnect repository, then retry\n}","handlingStrategy":"try-catch","validationCode":"if (repository == null || !repository.isConnected()) throw new IllegalStateException(\"Repository not connected before readRep\");","typeGuard":null,"tryCatchPattern":"try { meta.readRep(rep, metaStore, idStep, null); } catch (KettleException e) { log.error(\"ErrorReadingRepository, cause: \" + e.getCause(), e); throw e; }","preventionTips":["Ensure the repository connection is alive before loading transformations","Always inspect getCause() of repository-related KettleExceptions","Keep repository plugin versions and PDI versions in sync"],"tags":["pentaho","kettle","repository","salesforce","metadata"],"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"}