pentaho/pentaho-kettle · error · KettleException

SalesforceInputMeta.Exception.ErrorReadingRepository

Error message

SalesforceInputMeta.Exception.ErrorReadingRepository

What it means

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.

Solutions

  1. Check the wrapped cause in the log to identify the failing repository query or attribute
  2. Verify repository connectivity and that the transformation/step rows exist in the repository tables
  3. Re-save the transformation in Spoon to rewrite its repository rows
  4. Restore or repair the repository database if rows are corrupt
Defensive patterns

Strategy: retry

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("Repository not connected before readRep");

Try / catch

try {
  transMeta.loadRep(rep, metaStore, transObjectId, null, null);
} catch (KettleException e) {
  if (e.getCause() instanceof java.sql.SQLException) {
    rep.connect(login, pass); // reconnect and retry once
  }
  log.error("Repository read failed: {}", e.getCause(), e);
}

Prevention

When it happens

Trigger: 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.

Common situations: Repository database partially restored or migrated; transformation referencing a step deleted from the repository; repository connection instability; schema mismatch after a PDI repository upgrade.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/979d04de5c9ae66a. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinput/SalesforceInputMeta.java:709

      setRowLimit( rep.getStepAttributeString( idStep, "limit" ) );
      setReadFrom( rep.getStepAttributeString( idStep, "read_from" ) );
      setReadTo( rep.getStepAttributeString( idStep, "read_to" ) );
      setRecordsFilter(
        SalesforceConnectionUtils.getRecordsFilterByCode( Const.NVL( rep.getStepAttributeString(
          idStep, "records_filter" ), "" ) ) );
      setQueryAll( rep.getStepAttributeBoolean( idStep, "queryAll" ) );

      int nrFields = rep.countNrStepAttributes( idStep, "field_name" );

      allocate( nrFields );

      for ( int i = 0; i < nrFields; i++ ) {
        SalesforceInputField field = new SalesforceInputField();
        field.readRep( rep, metaStore, idStep, i );
        inputFields[i] = field;
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SalesforceInputMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep ) throws KettleException {
    super.saveRep( rep, metaStore, idTransformation, idStep );
    try {
      // H.kawaguchi Add 19-01-2009
      rep.saveStepAttribute( idTransformation, idStep, "condition", getCondition() );
      // H.kawaguchi Add 19-01-2009
      rep.saveStepAttribute( idTransformation, idStep, "query", getQuery() );
      rep.saveStepAttribute( idTransformation, idStep, "specifyQuery", isSpecifyQuery() );

      rep.saveStepAttribute( idTransformation, idStep, "include_targeturl", includeTargetURL() );
      rep.saveStepAttribute( idTransformation, idStep, "targeturl_field", getTargetURLField() );
      rep.saveStepAttribute( idTransformation, idStep, "include_module", includeModule() );
      rep.saveStepAttribute( idTransformation, idStep, "module_field", getModuleField() );
      rep.saveStepAttribute( idTransformation, idStep, "include_rownum", includeRowNumber() );

View on GitHub (pinned to f3058517a1)