{"record":{"id":"c792d69901865426","repo":"pentaho/pentaho-kettle","slug":"symmetriccryptotrans-exception-missingmessagefield","errorCode":"SymmetricCryptoTrans.Exception.MissingMessageField","errorMessage":"SymmetricCryptoTrans.Exception.MissingMessageField","messagePattern":"SymmetricCryptoTrans\\.Exception\\.MissingMessageField","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java","lineNumber":82,"sourceCode":"    }\n    if ( first ) {\n      first = false;\n\n      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Let's check that Result Field is given\n      if ( Utils.isEmpty( meta.getResultfieldname() ) ) {\n        // Result field is missing !\n        throw new KettleStepException( BaseMessages.getString(\n          PKG, \"SymmetricCryptoTrans.Exception.ErrorResultFieldMissing\" ) );\n      }\n\n      // Check if The message field is given\n      if ( Utils.isEmpty( meta.getMessageFied() ) ) {\n        // Message Field is missing !\n        throw new KettleStepException( BaseMessages.getString(\n          PKG, \"SymmetricCryptoTrans.Exception.MissingMessageField\" ) );\n      }\n      // Try to get Field index\n      data.indexOfMessage = getInputRowMeta().indexOfValue( meta.getMessageFied() );\n\n      // Let's check the Field\n      if ( data.indexOfMessage < 0 ) {\n        // The field is unreachable !\n        throw new KettleStepException( BaseMessages.getString(\n          PKG, \"SymmetricCryptoTrans.Exception.CouldnotFindField\", meta.getMessageFied() ) );\n      }\n\n      if ( !meta.isSecretKeyInField() ) {\n        String realSecretKey =\n          Encr.decryptPasswordOptionallyEncrypted( environmentSubstitute( meta.getSecretKey() ) );\n        if ( Utils.isEmpty( realSecretKey ) ) {\n          throw new KettleStepException( BaseMessages.getString(\n            PKG, \"SymmetricCryptoTrans.Exception.SecretKeyMissing\" ) );","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java#L64-L100","documentation":"The Symmetric Crypto (SymmetricCryptoTrans) step requires a message field — the input row field containing the text to encrypt/decrypt. processRow throws this KettleStepException during step initialization when the configured message field name is empty, because the step cannot know which column to process. The library fails fast before processing any rows.","triggerScenarios":"The step metadata's messageField (getMeta().getMessageFied()) is null or empty string when the transformation starts — i.e. the 'Message fieldname' option was never set in the step dialog, or the step was built programmatically / loaded from a broken XML/repo entry without that field.","commonSituations":"Building step metadata in code and forgetting setMessageField(); a transformation XML or repository record that lost the field name after a migration; copying a step template without filling required fields.","solutions":["Open the Symmetric Crypto step in Spoon and set the 'Message fieldname' to an existing input field.","If constructing programmatically, call meta.setMessageField(\"yourField\") before adding the step to the transformation.","Re-export/re-save the transformation so the field name is persisted to XML/repository."],"exampleFix":"// before\nSymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();\nmeta.setOperationType(SymmetricCryptoTransMeta.ENCRYPT_MODE);\n// after\nSymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();\nmeta.setOperationType(SymmetricCryptoTransMeta.ENCRYPT_MODE);\nmeta.setMessageField(\"payload\");","handlingStrategy":"validation","validationCode":"// Before running the transformation, verify required metadata\nSymmetricCryptoTransMeta meta = ...;\nif (meta.getMessageFied() == null || meta.getMessageFied().isEmpty()) {\n  throw new IllegalArgumentException(\n    \"Symmetric Crypto step requires a message field name\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"MissingMessageField\")) {\n    logError(\"Step misconfigured: set the message field name\");\n  }\n}","preventionTips":["Always set the message field when building step metadata programmatically.","Use the step dialog's field picker rather than typing field names.","Validate step metadata with meta.check() before executing."],"tags":["kettle","pdi","configuration","missing-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}