{"record":{"id":"a7c91e832b6fbd68","repo":"pentaho/pentaho-kettle","slug":"symmetriccryptotrans-exception-couldnotfindfield","errorCode":"SymmetricCryptoTrans.Exception.CouldnotFindField","errorMessage":"SymmetricCryptoTrans.Exception.CouldnotFindField","messagePattern":"SymmetricCryptoTrans\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java","lineNumber":91,"sourceCode":"      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\" ) );\n        }\n        // We have a static secret key\n        // Set secrete key\n        setSecretKey( realSecretKey );\n\n      } else {\n        // dynamic secret key\n        if ( Utils.isEmpty( meta.getSecretKeyField() ) ) {\n          throw new KettleStepException( BaseMessages.getString(","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetriccryptotrans/SymmetricCryptoTrans.java#L73-L109","documentation":"After the message field name passes the empty check, processRow looks up its index in the incoming row via getInputRowMeta().indexOfValue(). This error means the configured message field name does not exist in the row actually arriving at the step. The field is 'unreachable' so the step aborts with KettleStepException naming the missing field.","triggerScenarios":"meta.getMessageFied() is non-empty but indexOfValue() returns < 0: the upstream step doesn't emit a field with that exact name (typo, case/whitespace difference, or the producing step was removed/renamed).","commonSituations":"Renaming or deleting an upstream field after configuring this step; field name with trailing space; hop order changed so the field no longer reaches this step; locale/type differences after editing a Text File Input or Table Input.","solutions":["Verify the exact field name in the step dialog's 'Message fieldname' matches an upstream field (no typos/case differences).","Inspect the incoming row preview (right-click step > Preview) to see which fields actually arrive.","Re-add or restore the upstream step that produces the field, or update the message field setting.","Use Get Fields / field mapping in the dialog to pick the field instead of typing it."],"exampleFix":"// before\nmeta.setMessageField(\"Payload \"); // trailing space, field is 'Payload'\n// after\nmeta.setMessageField(\"Payload\");","handlingStrategy":"validation","validationCode":"// Verify the field exists in the incoming row meta before executing\nString msgField = meta.getMessageFied();\nif (prevRowMeta.indexOfValue(msgField) < 0) {\n  throw new IllegalArgumentException(\n    \"Message field '\" + msgField + \"' not found in incoming row\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"CouldnotFindField\")) {\n    logError(\"Field missing upstream: \" + e.getMessage());\n  }\n}","preventionTips":["Preview the upstream step to confirm exact field names before wiring this step.","Avoid manual typing of field names — use the dialog picker.","Re-check configuration after renaming/removing upstream steps."],"tags":["kettle","pdi","field-mapping","schema-mismatch"],"backgroundTag":"resource-not-found","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"}