pentaho/pentaho-kettle · error · KettleStepException

SymmetricCryptoTrans.Exception.ErrorResultFieldMissing

SymmetricCryptoTrans.Exception.ErrorResultFieldMissing

Error message

SymmetricCryptoTrans.Exception.ErrorResultFieldMissing

What it means

SymmetricCryptoTrans.processRow throws KettleStepException 'SymmetricCryptoTrans.Exception.ErrorResultFieldMissing' when the step's meta has an empty resultfieldname — the step encrypts/decrypts into a result field, and none is configured. This validation runs at the start of processRow before any row processing.

Solutions

  1. Set the result field in the step dialog ('Result field name') and re-save
  2. Call meta.setResultfieldname("encryptedMessage") when building the step programmatically
  3. Verify the XML/repository actually persisted resultfieldname (check the saved step node)
  4. Run the transformation's metadata validation (meta.check) before execution to catch missing fields early

Example fix

// before
SymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();
meta.setMessageFied("payload");
// after
SymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();
meta.setMessageFied("payload");
meta.setResultfieldname("encryptedPayload");
Defensive patterns

Strategy: validation

Validate before calling

if (meta.getResultfieldname() == null || meta.getResultfieldname().isEmpty()) {
  throw new IllegalArgumentException("Result field name required for Symmetric Crypto Trans step");
}

Try / catch

try { trans.prepareExecution(null); } catch (KettleStepException e) { log.error("Step validation failed: " + e.getMessage(), e); }

Prevention

When it happens

Trigger: Executing a Symmetric Crypto Trans step whose 'Result field name' property is empty: meta built programmatically without setResultfieldname(), or metadata loaded from XML/repository missing the field, then trans.prepareExecution()/startThreads invokes processRow.

Common situations: Creating the step via Java API without calling setResultfieldname; copying step config that omitted the result field; a user leaving the field blank in Spoon (check() should warn but the run still fails).

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java:75

    Object[] r = getRow(); // Get row from input rowset & set row busy!

    if ( r == null ) { // no more input to be expected...

      setOutputDone();
      return false;
    }
    if ( first ) {
      first = false;

      data.outputRowMeta = getInputRowMeta().clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );

      // Let's check that Result Field is given
      if ( Utils.isEmpty( meta.getResultfieldname() ) ) {
        // Result field is missing !
        throw new KettleStepException( BaseMessages.getString(
          PKG, "SymmetricCryptoTrans.Exception.ErrorResultFieldMissing" ) );
      }

      // Check if The message field is given
      if ( Utils.isEmpty( meta.getMessageFied() ) ) {
        // Message Field is missing !
        throw new KettleStepException( BaseMessages.getString(
          PKG, "SymmetricCryptoTrans.Exception.MissingMessageField" ) );
      }
      // Try to get Field index
      data.indexOfMessage = getInputRowMeta().indexOfValue( meta.getMessageFied() );

      // Let's check the Field
      if ( data.indexOfMessage < 0 ) {
        // The field is unreachable !
        throw new KettleStepException( BaseMessages.getString(
          PKG, "SymmetricCryptoTrans.Exception.CouldnotFindField", meta.getMessageFied() ) );
      }

View on GitHub (pinned to f3058517a1)