pentaho/pentaho-kettle · error · KettleException

CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo

CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

CreditCardValidatorMeta.readRep loads step settings from a repository by step id. Any exception while reading step attributes (fieldnames, resultfieldname, cardtype, notvalidmsg, onlydigits) is wrapped in a KettleException with UnexpectedErrorReadingStepInfo and the original cause.

Solutions

  1. Check the repository database table r_step_attribute for the step's rows
  2. Re-save the step/transformation in Spoon to rewrite its attributes
  3. Test repository connectivity and re-open the transformation

Example fix

// before
readRep(rep, metaStore, staleIdStep, databases);
// after — verify the step exists before reading
if (rep.getStepAttributes(staleIdStep) != null) readRep(rep, metaStore, staleIdStep, databases);
Defensive patterns

Strategy: try-catch

Validate before calling

if (!rep.stepExists(idStep)) throw new IllegalStateException("Step missing from repository");

Try / catch

try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { logError("Repository read failed: " + e.getCause()); }

Prevention

When it happens

Trigger: Opening a transformation from a repository where the step's attribute rows are missing/corrupt, or the repository connection fails mid-read of getStepAttributeString/getStepAttributeBoolean.

Common situations: Corrupt r_kettle_step_attribute rows in the database repository; broken repository connection; step id referencing a deleted/incomplete save.

Related errors


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

Appendix: source

Thrown at plugins/credit-card-validator/impl/src/main/java/org/pentaho/di/trans/steps/creditcardvalidator/CreditCardValidatorMeta.java:221

      notvalidmsg = XMLHandler.getTagValue( stepnode, "notvalidmsg" );
      onlydigits = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "onlydigits" ) );

    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "CreditCardValidatorMeta.Exception.UnableToReadStepInfo" ), e );
    }
  }

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

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "CreditCardValidatorMeta.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, "fieldname", fieldname );
      rep.saveStepAttribute( id_transformation, id_step, "resultfieldname", resultfieldname );
      rep.saveStepAttribute( id_transformation, id_step, "cardtype", cardtype );
      rep.saveStepAttribute( id_transformation, id_step, "notvalidmsg", notvalidmsg );
      rep.saveStepAttribute( id_transformation, id_step, "onlydigits", onlydigits );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "CreditCardValidatorMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

View on GitHub (pinned to f3058517a1)