{"record":{"id":"b961050b5451b1ca","repo":"pentaho/pentaho-kettle","slug":"syslogmessage-exception-couldnotfindfield","errorCode":null,"errorMessage":"SyslogMessage.Exception.CouldnotFindField","messagePattern":"SyslogMessage\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/syslog/SyslogMessage.java","lineNumber":74,"sourceCode":"\n    Object[] r = getRow(); // Get row from input rowset & set row busy!\n    if ( r == null ) { // no more input to be expected...\n\n      setOutputDone();\n      return false;\n    }\n    if ( first ) {\n      first = false;\n      // Check if message field is provided\n      if ( Utils.isEmpty( meta.getMessageFieldName() ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"SyslogMessage.Error.MessageFieldMissing\" ) );\n      }\n\n      // cache the position of the source filename field\n      data.indexOfMessageFieldName = getInputRowMeta().indexOfValue( meta.getMessageFieldName() );\n      if ( data.indexOfMessageFieldName < 0 ) {\n        // The field is unreachable !\n        throw new KettleException( BaseMessages.getString( PKG, \"SyslogMessage.Exception.CouldnotFindField\", meta\n            .getMessageFieldName() ) );\n      }\n\n    }\n\n    try {\n      // get message\n      String message = getInputRowMeta().getString( r, data.indexOfMessageFieldName );\n\n      if ( Utils.isEmpty( message ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"SyslogMessage.Error.MessageEmpty\" ) );\n      }\n\n      // Send message\n      SyslogDefs.sendMessage( data.syslog, SyslogDefs.getPriority( meta.getPriority() ), message,\n          meta.isAddTimestamp(), data.datePattern, meta.isAddHostName() );\n\n      putRow( getInputRowMeta(), r ); // copy row to output rowset(s);","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/syslog/SyslogMessage.java#L56-L92","documentation":"Thrown in SyslogMessage.processRow when the configured message field name cannot be found in the incoming row metadata (indexOfValue returns -1). The field name was specified but the row does not contain it.","triggerScenarios":"Message fieldname set to a field the upstream step never produces; field renamed upstream; case mismatch in field name; step reading from a stream with different layout than designed.","commonSituations":"Renaming a field in a Select Values step upstream without updating Syslog Message; wiring the step into a different hop with a different row layout; typos in the field name.","solutions":["Set the message fieldname to a field that actually exists in the incoming stream","Check upstream steps (e.g. Select Values, Filter) for renames/removals of the field","Preview upstream rows to confirm field names, then fix the setting","Add a Select Values or User Defined Java Expression step to create the field if missing"],"exampleFix":"// before\nmeta.setMessageFieldName(\"msg\"); // upstream emits \"message\"\n// after\nmeta.setMessageFieldName(\"message\");","handlingStrategy":"type-guard","validationCode":"String field = meta.getMessageFieldName();\nif (field != null && inputRowMeta.indexOfValue(field) < 0) { throw new IllegalArgumentException(\"Field not in stream: \" + field); }","typeGuard":"boolean hasField = (meta.getMessageFieldName() != null) && (getInputRowMeta().indexOfValue(meta.getMessageFieldName()) >= 0);","tryCatchPattern":"try { ... } catch (KettleException e) { if (e.getMessage().contains(\"CouldnotFindField\")) { logError(\"Field missing from incoming rows: \" + meta.getMessageFieldName()); setErrors(1); } }","preventionTips":["Preview upstream rows to confirm the exact field name","Update dependent steps whenever upstream field names change","Watch for case sensitivity in field names"],"tags":["kettle","syslog","row-fields","configuration"],"backgroundTag":"entity-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"}