{"record":{"id":"dca106177cf714cf","repo":"pentaho/pentaho-kettle","slug":"symmetriccryptotrans-exception-errorresultfieldmissing","errorCode":"SymmetricCryptoTrans.Exception.ErrorResultFieldMissing","errorMessage":"SymmetricCryptoTrans.Exception.ErrorResultFieldMissing","messagePattern":"SymmetricCryptoTrans\\.Exception\\.ErrorResultFieldMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java","lineNumber":75,"sourceCode":"\n    Object[] r = getRow(); // Get row from input rowset & set row busy!\n\n    if ( r == null ) { // no more input to be expected...\n\n      setOutputDone();\n      return false;\n    }\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      }","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java#L57-L93","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Set the result field in the step dialog ('Result field name') and re-save","Call meta.setResultfieldname(\"encryptedMessage\") when building the step programmatically","Verify the XML/repository actually persisted resultfieldname (check the saved step node)","Run the transformation's metadata validation (meta.check) before execution to catch missing fields early"],"exampleFix":"// before\nSymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();\nmeta.setMessageFied(\"payload\");\n// after\nSymmetricCryptoTransMeta meta = new SymmetricCryptoTransMeta();\nmeta.setMessageFied(\"payload\");\nmeta.setResultfieldname(\"encryptedPayload\");","handlingStrategy":"validation","validationCode":"if (meta.getResultfieldname() == null || meta.getResultfieldname().isEmpty()) {\n  throw new IllegalArgumentException(\"Result field name required for Symmetric Crypto Trans step\");\n}","typeGuard":null,"tryCatchPattern":"try { trans.prepareExecution(null); } catch (KettleStepException e) { log.error(\"Step validation failed: \" + e.getMessage(), e); }","preventionTips":["Always set resultfieldname when constructing the meta via API","Run metadata check() before executing transformations","Validate saved transformations re-load with all fields intact"],"tags":["validation","missing-field","kettle-step","configuration"],"backgroundTag":"missing-required-argument","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"}