pentaho/pentaho-kettle · error · KettleException

VALUEMAPPER0006

VALUEMAPPER0006

Error message

ValueMapperMeta.RuntimeError.UnableToSaveRepository.VALUEMAPPER0006

What it means

ValueMapperMeta.saveRep persists the step's mappings to the repository; any Exception is wrapped in a KettleException with VALUEMAPPER0006 ('Couldn't save step info to repository' for step id included in the message). Saving fails after the step id is obtained but attribute writes go wrong.

Solutions

  1. Re-test the repository connection and retry saving the transformation.
  2. Check the wrapped cause for the underlying DB error (constraint, lock, permission) and fix accordingly.
  3. Save locally as .ktr first to preserve work, then attempt repository save again.
  4. Increase DB transaction/batch limits if the mapping table is huge, or reduce mappings per save.
Defensive patterns

Strategy: try-catch

Validate before calling

// Check write access before saving:
if (rep.isReadOnly()) throw new IllegalStateException("Repository is read-only");

Try / catch

try {
  saveRep(rep, metaStore, id_transformation, id_step);
} catch (KettleException e) {
  logError("Save failed, exporting to file instead", e);
  transMeta.exportXML(...); // preserve work locally
}

Prevention

When it happens

Trigger: saveRep calls rep.saveStepAttribute(id_transformation, id_step, i, "source_value"/"target_value", ...) and the repository write throws — connection lost, DB constraint violation, read-only repo.

Common situations: Repository DB connection dropped mid-save; disk full or DB read-only; transaction size limits with very large mapping tables; concurrent edits locking rows; insufficient write permissions.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/valuemapper/ValueMapperMeta.java:255

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ValueMapperMeta.RuntimeError.UnableToReadRepository.VALUEMAPPER0005" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "field_to_use", fieldToUse );
      rep.saveStepAttribute( id_transformation, id_step, "target_field", targetField );
      rep.saveStepAttribute( id_transformation, id_step, "non_match_default", nonMatchDefault );

      for ( int i = 0; i < sourceValue.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "source_value", getNullOrEmpty( sourceValue[i] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "target_value", getNullOrEmpty( targetValue[i] ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ValueMapperMeta.RuntimeError.UnableToSaveRepository.VALUEMAPPER0006", "" + id_step ), e );
    }

  }

  private String getNullOrEmpty( String str ) {
    return str == null ? StringUtils.EMPTY : str;
  }

  @Override
  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( CheckResult.TYPE_RESULT_WARNING, BaseMessages.getString(
          PKG, "ValueMapperMeta.CheckResult.NotReceivingFieldsFromPreviousSteps" ), stepMeta );

View on GitHub (pinned to f3058517a1)