pentaho/pentaho-kettle · error · KettleException

InjectorMeta.Exception.ErrorReadingStepInfoFromRepository

Error message

InjectorMeta.Exception.ErrorReadingStepInfoFromRepository

What it means

InjectorMeta.readRep() reads the injector step's field definitions (name, type, length, precision) from the repository and wraps any exception in a KettleException with this localized message. The injector step's field layout cannot be reconstructed, so rows injected at runtime would not match the saved definition.

Solutions

  1. Check getCause() for the actual failure (DB error vs. invalid type name)
  2. Fix the field_type values stored in the repository (re-save the step via Spoon)
  3. Verify repository connectivity and schema version compatibility
  4. Recreate the injector step and re-save the transformation

Example fix

// before (repo row)
field_type = "INTGER" // typo
// after
field_type = "Integer"
Defensive patterns

Strategy: try-catch

Validate before calling

if (!repo.isConnected()) { repo.connect(user, pass); }
Arrays.stream(typeNames).forEach(t -> { if (!isKnownType(t)) throw new IllegalStateException(t); });

Type guard

boolean isKnownType(String t) { try { ValueMetaFactory.getIdForValueMeta(t); return true; } catch (Exception e) { return false; } }

Try / catch

try { TransMeta tm = new TransMeta(repo, dir, transName, monitor, metaStore); } catch (KettleException e) { logger.error("Injector load failed: " + e.getCause(), e); }

Prevention

When it happens

Trigger: readRep during transformation load while rep.getStepAttributeString/getStepAttributeInteger or ValueMetaFactory.getIdForValueMeta throws — repository read failure or an unknown field_type name string.

Common situations: field_type attribute contains an invalid value type name (saved by a different version or external tool); repository DB unreachable; attribute rows missing for id_step.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/injector/InjectorMeta.java:194

  }

  public void setDefault() {
    allocate( 0 );
  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
      allocate( nrfields );

      for ( int i = 0; i < nrfields; i++ ) {
        fieldname[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        type[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
        length[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
        precision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "InjectorMeta.Exception.ErrorReadingStepInfoFromRepository" ), e );
    }

  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldname.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldname[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type",
          ValueMetaFactory.getValueMetaName( type[i] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_length", length[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_precision", precision[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "InjectorMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );

View on GitHub (pinned to f3058517a1)