pentaho/pentaho-kettle · error · KettleException

MailValidatorMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

MailValidatorMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

Thrown by MailValidatorMeta.readRep() when reading the step's attributes from a repository fails. It loads emailSender, defaultSMTPField and isdynamicDefaultSMTP via rep.getStepAttributeString/Boolean; any repository exception is wrapped in a KettleException with this message. It indicates the step metadata could not be loaded from the repository database.

Solutions

  1. Verify repository connectivity (test the repository connection in Spoon) and retry loading the transformation
  2. Inspect R_STEP_ATTRIBUTE for the id_step rows of this step; recreate the step if attributes are missing
  3. Check the wrapped cause (e) in the KettleException log for the actual JDBC/repository error
  4. Upgrade or repair the repository schema (e.g. via the repository upgrade tool) if versions mismatch

Example fix

// before: loading from a stale repository connection
transMeta = TransMetaFactory.loadTransformation(repo, 'trans', null, true, null);
// after: ensure repository is connected first
if (!repo.isConnected()) { repo.connect(); }
transMeta = TransMetaFactory.loadTransformation(repo, 'trans', null, true, null);
Defensive patterns

Strategy: try-catch

Validate before calling

// Before loading, verify repository reachability
if (!repository.isConnected()) throw new IllegalStateException('Repository not connected');
// and that the step exists
StepMeta sm = transMeta.findStep('Mail Validator');
if (sm == null) throw new IllegalStateException('Step missing from transformation');

Type guard

boolean stepLoadable(Repository rep, ObjectId idStep) {
  try { return rep != null && rep.isConnected() && idStep != null; }
  catch (Exception e) { return false; }
}

Try / catch

try {
  meta.readRep(rep, metaStore, idStep, databases);
} catch (KettleException e) {
  log.error('Repo read failed for step ' + idStep + ': ' + e.getCause(), e);
  // fall back to defaults or re-create the step
}

Prevention

When it happens

Trigger: loadRep() on a step whose repository row/attributes are missing, corrupt, or unreachable: repository connection failure, deleted step attributes, or a repository schema mismatch raises inside the try block.

Common situations: Repository database down or network dropped mid-load; attributes deleted manually from R_STEP_ATTRIBUTE; loading a transformation saved by an incompatible PDI version; broken repository connection settings.

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

Appendix: source

Thrown at plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java:410

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      emailfield = rep.getStepAttributeString( id_step, "emailfield" );
      resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
      ResultAsString = rep.getStepAttributeBoolean( id_step, "ResultAsString" );
      smtpCheck = rep.getStepAttributeBoolean( id_step, "smtpCheck" );

      emailValideMsg = rep.getStepAttributeString( id_step, "emailValideMsg" );
      emailNotValideMsg = rep.getStepAttributeString( id_step, "emailNotValideMsg" );
      errorsFieldName = rep.getStepAttributeString( id_step, "errorsFieldName" );
      timeout = rep.getStepAttributeString( id_step, "timeout" );
      defaultSMTP = rep.getStepAttributeString( id_step, "defaultSMTP" );
      emailSender = rep.getStepAttributeString( id_step, "emailSender" );
      defaultSMTPField = rep.getStepAttributeString( id_step, "defaultSMTPField" );

      isdynamicDefaultSMTP = rep.getStepAttributeBoolean( id_step, "isdynamicDefaultSMTP" );

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

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "emailfield", emailfield );
      rep.saveStepAttribute( id_transformation, id_step, "resultfieldname", resultfieldname );
      rep.saveStepAttribute( id_transformation, id_step, "ResultAsString", ResultAsString );
      rep.saveStepAttribute( id_transformation, id_step, "smtpCheck", smtpCheck );

      rep.saveStepAttribute( id_transformation, id_step, "emailValideMsg", emailValideMsg );
      rep.saveStepAttribute( id_transformation, id_step, "emailNotValideMsg", emailNotValideMsg );
      rep.saveStepAttribute( id_transformation, id_step, "errorsFieldName", errorsFieldName );
      rep.saveStepAttribute( id_transformation, id_step, "timeout", timeout );
      rep.saveStepAttribute( id_transformation, id_step, "defaultSMTP", defaultSMTP );
      rep.saveStepAttribute( id_transformation, id_step, "emailSender", emailSender );
      rep.saveStepAttribute( id_transformation, id_step, "defaultSMTPField", defaultSMTPField );

View on GitHub (pinned to f3058517a1)