pentaho/pentaho-kettle · error · KettleException

NullIfMeta.Exception.UnableToSaveStepInfoToRepository

Error message

NullIfMeta.Exception.UnableToSaveStepInfoToRepository

What it means

NullIfMeta.saveRep() writes the step's field_name/field_value attributes to the repository. Any failure in rep.saveStepAttribute(...) is wrapped in a KettleException with this message plus id_step, chaining the original cause.

Solutions

  1. Inspect getCause() for the concrete database error.
  2. Confirm the repository user has write access and the DB is healthy.
  3. Retry saving the transformation after restoring connectivity.
  4. Run repository upgrade scripts if schema versions differ.

Example fix

null
Defensive patterns

Strategy: retry

Validate before calling

// Check repository user permissions / connectivity before save

Try / catch

try { meta.saveRep(rep, metaStore, transId, stepId); } catch (KettleException e) { log.error("Failed saving Null If step " + stepId + ": " + e.getCause(), e); /* retry or alert */ }

Prevention

When it happens

Trigger: Calling saveRep(rep, metaStore, id_transformation, id_step) when a repository write fails — DB offline, permissions, constraint violation, or connection drop mid-save.

Common situations: Read-only repository account; network outage while saving a transformation; repository DB at capacity; schema mismatch after Pentaho upgrade.

Related errors


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

Appendix: source

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

      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 );
    }

  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ) {
    CheckResult cr;
    if ( prev == null || prev.size() == 0 ) {
      cr =
          new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString( PKG,
              "NullIfMeta.CheckResult.NoReceivingFieldsError" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
          new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG,
              "NullIfMeta.CheckResult.StepReceivingFieldsOK", prev.size() + "" ), stepMeta );

View on GitHub (pinned to f3058517a1)