pentaho/pentaho-kettle · error · KettleException

LoadFileInputMeta.Exception.ErrorReadingRepository

LoadFileInputMeta.Exception.ErrorReadingRepository

Error message

Unexpected error reading step information from the repository

What it means

Thrown from LoadFileInputMeta.readRep when loading step settings from a Kettle repository. Any Exception from rep.getStepAttributeString(...) or related repository calls is wrapped in a KettleException with message key LoadFileInputMeta.Exception.ErrorReadingRepository and the generic text 'Unexpected error reading step information from the repository'. It indicates repository persistence layer failure while deserializing the step metadata.

Solutions

  1. Check the wrapped cause — usually a SQLException; verify the repository database is reachable and credentials are valid.
  2. Test repository connection in Spoon (Tools > Repository > Connect) and retry.
  3. Verify the repository schema is up to date for your PDI version (run the upgrade SQL scripts).
  4. Export the transformation to XML from a working client and import into a fresh repository entry as a workaround.

Example fix

// before
// kettle.properties points at stale repo host -> readRep fails
// after
// fix repositories.xml / connection settings so the repository DB host:port is correct, then reopen the transformation
Defensive patterns

Strategy: retry

Validate before calling

// Before opening the transformation, verify repository connectivity:
Repository repo = KettleEnvironment.loadRepository(...);
if (!repo.isConnected() && !repo.connect(...)) throw new IllegalStateException("Repository unreachable");

Try / catch

try {
  loadTransformationFromRepository();
} catch (KettleException e) {
  if (e.getMessage().contains("ErrorReadingRepository")) {
    log.error("Repository read failed: " + e.getCause(), e);
    // retry with backoff; verify DB connection/schema before retrying
  } else { throw e; }
}

Prevention

When it happens

Trigger: Opening a transformation stored in a Kettle repository (DB or file repository) whose r_step_attribute rows cannot be read: repository database down/unreachable, connection dropped mid-read, schema mismatch (missing attribute table/columns), or a corrupted repository entry.

Common situations: Repository database upgraded/restored inconsistently; network blip between PDI and the repository DB; wrong repository credentials/instance; using a repository created by a much older Pentaho version.

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/7d25781282f4666b. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java:923

        field.setTrimType( LoadFileInputField.getTrimTypeByCode( rep.getStepAttributeString( idStep, i,
            FIELD_TRIM_TYPE_REP ) ) );
        field.setRepeated( rep.getStepAttributeBoolean( idStep, i, FIELD_REPEAT_REP ) );

        inputFields[i] = field;
      }
      fileInField = rep.getStepAttributeBoolean( idStep, IS_IN_FIELDS );

      dynamicFilenameField = rep.getStepAttributeString( idStep, DYNAMIC_FILENAME_FIELD );
      shortFileFieldName = rep.getStepAttributeString( idStep, SHORT_FILE_FIELD_NAME );
      pathFieldName = rep.getStepAttributeString( idStep, PATH_FIELD_NAME );
      hiddenFieldName = rep.getStepAttributeString( idStep, HIDDEN_FIELD_NAME );
      lastModificationTimeFieldName = rep.getStepAttributeString( idStep, LAST_MODIFICATION_TIME_FIELD_NAME );
      rootUriNameFieldName = rep.getStepAttributeString( idStep, ROOT_URI_NAME_FIELD_NAME );
      uriNameFieldName = rep.getStepAttributeString(  idStep, URI_NAME_FIELD_NAME );
      extensionFieldName = rep.getStepAttributeString( idStep, EXTENSION_FIELD_NAME );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG,
              "LoadFileInputMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep ) throws KettleException {
    try {
      rep.saveStepAttribute( idTransformation, idStep, INCLUDE, includeFilename );
      rep.saveStepAttribute( idTransformation, idStep, INCLUDE_FIELD, filenameField );
      rep.saveStepAttribute( idTransformation, idStep, ADDRESULTFILE, addResultFile );
      rep.saveStepAttribute( idTransformation, idStep, IS_IGNORE_EMPTY_FILE, isIgnoreEmptyFile );
      rep.saveStepAttribute( idTransformation, idStep, IS_IGNORE_MISSING_PATH, isIgnoreMissingPath );

      rep.saveStepAttribute( idTransformation, idStep, ROWNUM, includeRowNumber );
      rep.saveStepAttribute( idTransformation, idStep, ROWNUM_FIELD, rowNumberField );
      rep.saveStepAttribute( idTransformation, idStep, LIMIT, rowLimit );
      rep.saveStepAttribute( idTransformation, idStep, ENCODING, encoding );

View on GitHub (pinned to f3058517a1)