{"record":{"id":"979d04de5c9ae66a","repo":"pentaho/pentaho-kettle","slug":"salesforceinputmeta-exception-errorreadingrepository","errorCode":null,"errorMessage":"SalesforceInputMeta.Exception.ErrorReadingRepository","messagePattern":"SalesforceInputMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinput/SalesforceInputMeta.java","lineNumber":709,"sourceCode":"      setRowLimit( rep.getStepAttributeString( idStep, \"limit\" ) );\n      setReadFrom( rep.getStepAttributeString( idStep, \"read_from\" ) );\n      setReadTo( rep.getStepAttributeString( idStep, \"read_to\" ) );\n      setRecordsFilter(\n        SalesforceConnectionUtils.getRecordsFilterByCode( Const.NVL( rep.getStepAttributeString(\n          idStep, \"records_filter\" ), \"\" ) ) );\n      setQueryAll( rep.getStepAttributeBoolean( idStep, \"queryAll\" ) );\n\n      int nrFields = rep.countNrStepAttributes( idStep, \"field_name\" );\n\n      allocate( nrFields );\n\n      for ( int i = 0; i < nrFields; i++ ) {\n        SalesforceInputField field = new SalesforceInputField();\n        field.readRep( rep, metaStore, idStep, i );\n        inputFields[i] = field;\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SalesforceInputMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep ) throws KettleException {\n    super.saveRep( rep, metaStore, idTransformation, idStep );\n    try {\n      // H.kawaguchi Add 19-01-2009\n      rep.saveStepAttribute( idTransformation, idStep, \"condition\", getCondition() );\n      // H.kawaguchi Add 19-01-2009\n      rep.saveStepAttribute( idTransformation, idStep, \"query\", getQuery() );\n      rep.saveStepAttribute( idTransformation, idStep, \"specifyQuery\", isSpecifyQuery() );\n\n      rep.saveStepAttribute( idTransformation, idStep, \"include_targeturl\", includeTargetURL() );\n      rep.saveStepAttribute( idTransformation, idStep, \"targeturl_field\", getTargetURLField() );\n      rep.saveStepAttribute( idTransformation, idStep, \"include_module\", includeModule() );\n      rep.saveStepAttribute( idTransformation, idStep, \"module_field\", getModuleField() );\n      rep.saveStepAttribute( idTransformation, idStep, \"include_rownum\", includeRowNumber() );","sourceCodeStart":691,"sourceCodeEnd":727,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinput/SalesforceInputMeta.java#L691-L727","documentation":"Thrown from SalesforceInputMeta.readRep() when loading the step's settings from the repository fails. Each field's readRep() and the surrounding repository queries run inside a try/catch that rethrows as a KettleException with the 'ErrorReadingRepository' message.","triggerScenarios":"readRep() invoked while a repository query fails: the step's row (r step id) or its field rows are missing/corrupt in r_step_attribute/r_step, the repository connection drops mid-read, or a field attribute value cannot be converted.","commonSituations":"Repository database partially restored or migrated; transformation referencing a step deleted from the repository; repository connection instability; schema mismatch after a PDI repository upgrade.","solutions":["Check the wrapped cause in the log to identify the failing repository query or attribute","Verify repository connectivity and that the transformation/step rows exist in the repository tables","Re-save the transformation in Spoon to rewrite its repository rows","Restore or repair the repository database if rows are corrupt"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected before readRep\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadRep(rep, metaStore, transObjectId, null, null);\n} catch (KettleException e) {\n  if (e.getCause() instanceof java.sql.SQLException) {\n    rep.connect(login, pass); // reconnect and retry once\n  }\n  log.error(\"Repository read failed: {}\", e.getCause(), e);\n}","preventionTips":["Monitor repository DB connectivity before batch-loading transformations","Verify transformation rows exist in repository tables after restores/migrations","Keep the repository schema upgraded to the PDI version"],"tags":["kettle","repository","database","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"}