pentaho/pentaho-kettle · error · KettleException

LDIFInputMeta.Exception.ErrorReadingRepository

LDIFInputMeta.Exception.ErrorReadingRepository

Error message

LDIFInputMeta.Exception.ErrorReadingRepository

What it means

LDIFInputMeta.readRep wraps repository deserialization in try/catch and throws KettleException('Error reading step info from repository') when any rep.getStepAttribute* call fails. It occurs while loading the step's settings from a Pentaho Repository database, not from a file.

Solutions

  1. Check repository database connectivity and credentials.
  2. Verify repository schema version matches the Pentaho version (run repository upgrade if needed).
  3. Inspect r_step_attribute rows for the step's id_step; restore from backup if corrupt.
  4. Export the transformation to XML and re-import into a healthy repository.

Example fix

// before
// repo DB unreachable -> readRep throws
// after: validate connection before load
if (!rep.testConnection()) {
  throw new KettleException("Repository unavailable: " + rep.getName());
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!rep.testConnection()) {
  throw new KettleException("Repository unavailable before loading transformation");
}

Try / catch

try {
  TransMeta tm = new TransMeta(rep, "my transform", null, true, null, null);
} catch (KettleException e) {
  log.error("Repository read failed; check DB connection/schema version", e);
}

Prevention

When it happens

Trigger: Loading a transformation stored in a Pentaho Repository where r_step_attribute reads fail — DB connection issues, schema/version mismatch, or corrupt/missing rows for id_step.

Common situations: Repository database down or network dropped mid-load; repository schema not upgraded after a Pentaho version upgrade; row corruption or manually deleted attributes.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java:968

        field.setGroupSymbol( rep.getStepAttributeString( id_step, i, "field_group" ) );
        field.setLength( (int) rep.getStepAttributeInteger( id_step, i, "field_length" ) );
        field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, "field_precision" ) );
        field.setTrimType( LDIFInputField.getTrimTypeByCode( rep.getStepAttributeString(
          id_step, i, "field_trim_type" ) ) );
        field.setRepeated( rep.getStepAttributeBoolean( id_step, i, "field_repeat" ) );

        inputFields[i] = field;
      }
      shortFileFieldName = rep.getStepAttributeString( id_step, "shortFileFieldName" );
      pathFieldName = rep.getStepAttributeString( id_step, "pathFieldName" );
      hiddenFieldName = rep.getStepAttributeString( id_step, "hiddenFieldName" );
      lastModificationTimeFieldName = rep.getStepAttributeString( id_step, "lastModificationTimeFieldName" );
      rootUriNameFieldName = rep.getStepAttributeString( id_step, "rootUriNameFieldName" );
      extensionFieldName = rep.getStepAttributeString( id_step, "extensionFieldName" );
      sizeFieldName = rep.getStepAttributeString( id_step, "sizeFieldName" );
      uriNameFieldName = rep.getStepAttributeString(  id_step, "uriNameFieldName" );
    } catch ( Exception e ) {
      throw new KettleException(
        BaseMessages.getString( PKG, "LDIFInputMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "filefield", filefield );
      rep.saveStepAttribute( id_transformation, id_step, "dynamicFilenameField", dynamicFilenameField );
      rep.saveStepAttribute( id_transformation, id_step, "include", includeFilename );
      rep.saveStepAttribute( id_transformation, id_step, "include_field", filenameField );
      rep.saveStepAttribute( id_transformation, id_step, "rownum", includeRowNumber );
      rep.saveStepAttribute( id_transformation, id_step, "rownum_field", rowNumberField );
      rep.saveStepAttribute( id_transformation, id_step, "contenttype", includeContentType );
      rep.saveStepAttribute( id_transformation, id_step, "contenttype_field", contentTypeField );
      rep.saveStepAttribute( id_transformation, id_step, "dn_field", DNField );
      rep.saveStepAttribute( id_transformation, id_step, "dn", includeDN );
      rep.saveStepAttribute( id_transformation, id_step, "limit", rowLimit );
      rep.saveStepAttribute( id_transformation, id_step, "addtoresultfilename", addtoresultfilename );

View on GitHub (pinned to f3058517a1)