pentaho/pentaho-kettle · error · KettleException

NullIfMeta.Exception.UnexpectedErrorReadingStepInfoFromRepos…

Error message

NullIfMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

What it means

NullIfMeta.readRep() loads the Null If step's configured fields from the Pentaho repository using rep.getStepAttributeString(...). Any exception during these reads is wrapped in a KettleException with this 'UnexpectedErrorReadingStepInfoFromRepository' message, chaining the cause.

Solutions

  1. Check getCause() for the underlying repository/database error.
  2. Confirm the repository connection works and id_step exists in the repository tables.
  3. Re-save or re-import the step metadata; restore from backup if rows are corrupted.
  4. Verify repository schema is upgraded to your Pentaho version.

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// Confirm the step id exists before reading
// e.g. ObjectId id = rep.getStepID(stepName, transMeta.getObjectId()); if (id == null) fail early;

Try / catch

try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { log.error("readRep failed for step " + idStep + ": " + e.getCause(), e); throw e; }

Prevention

When it happens

Trigger: Calling readRep(rep, metaStore, id_step) when repository attribute lookups fail — bad id_step, DB connectivity loss, corrupted/missing R_STEP_ATTRIBUTE rows.

Common situations: Repository database unavailable while opening a transformation; step metadata deleted or partially saved; schema drift between Pentaho versions; concurrent edits to the same transformation.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/nullif/NullIfMeta.java:213

    }
    retval.append( "      </fields>" + Const.CR );

    return retval.toString();
  }

  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++ ) {
        fields[i].setFieldName( rep.getStepAttributeString( id_step, i, "field_name" ) );
        fields[i].setFieldValue( rep.getStepAttributeString( id_step, i, "field_value" ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG,
          "NullIfMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
    throws KettleException {
    try {
      for ( int i = 0; i < fields.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fields[i].getFieldName() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_value", fields[i].getFieldValue() );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "NullIfMeta.Exception.UnableToSaveStepInfoToRepository" )
          + id_step, e );
    }

  }

View on GitHub (pinned to f3058517a1)