{"record":{"id":"4f872d62954167e4","repo":"pentaho/pentaho-kettle","slug":"e-no-own-message-error-building-csv-input-fields","errorCode":null,"errorMessage":"e (no own message; error building CSV input fields)","messagePattern":"e \\(no own message; error building CSV input fields\\)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/csvinput/CsvInputMeta.java","lineNumber":408,"sourceCode":"\n      if ( !Utils.isEmpty( filenameField ) && includingFilename ) {\n        ValueMetaInterface filenameMeta = new ValueMetaString( filenameField );\n        filenameMeta.setOrigin( origin );\n        if ( lazyConversionActive ) {\n          filenameMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_BINARY_STRING );\n          filenameMeta.setStorageMetadata( new ValueMetaString( filenameField ) );\n        }\n        rowMeta.addValueMeta( filenameMeta );\n      }\n\n      if ( !Utils.isEmpty( rowNumField ) ) {\n        ValueMetaInterface rowNumMeta = new ValueMetaInteger( rowNumField );\n        rowNumMeta.setLength( 10 );\n        rowNumMeta.setOrigin( origin );\n        rowMeta.addValueMeta( rowNumMeta );\n      }\n    } catch ( Exception e ) {\n      throw new KettleStepException( e );\n    }\n\n  }\n\n  @Override\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n    if ( prev == null || prev.size() == 0 ) {\n      cr =\n        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"CsvInputMeta.CheckResult.NotReceivingFields\" ), stepMeta );\n      remarks.add( cr );\n    } else {\n      cr =\n        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(\n          PKG, \"CsvInputMeta.CheckResult.StepRecevingData\", prev.size() + \"\" ), stepMeta );","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/csvinput/CsvInputMeta.java#L390-L426","documentation":"CsvInputMeta.getFields() builds the output row layout (input fields plus optional filename/row-number columns) and rethrows any unexpected exception as a bare KettleStepException with no message. The cause (e.g. a field type/trim/type-conversion problem while constructing ValueMeta objects) is the only clue. It is raised during transformation initialization or preview updates.","triggerScenarios":"updatePreview / TransMeta pipeline composition calls getFields when any ValueMeta construction fails — e.g. null inputFields entries, invalid trim type codes, invalid length/precision combinations, or a NPE on an unconfigured field name.","commonSituations":"Transformation imported from an older version where field metadata is incomplete; metadata injection leaving fields partially configured; a field with null name or trim type code that getTrimTypeByCode cannot resolve.","solutions":["Print/log e.getCause() — the message-less KettleStepException hides the real error.","Open the CSV Input step dialog and re-confirm all fields have valid names, types, lengths and trim types.","Delete and re-add the field list (or re-run metadata injection) to replace corrupted field metadata.","Validate the transformation programmatically with check() before running to surface bad field definitions."],"exampleFix":"// before: field added without a type\nfield.setName(\"amount\"); // ValueMeta construction fails later\n// after\nfield.setName(\"amount\");\nfield.setType(ValueMetaInterface.TYPE_NUMBER); // explicit valid type","handlingStrategy":"validation","validationCode":"for (CsvInputField f : meta.getInputFields()) {\n  if (f.getName() == null || f.getName().isEmpty()) throw new IllegalArgumentException(\"Field without name\");\n  if (f.getTrimType() < 0 || f.getTrimType() > 3) throw new IllegalArgumentException(\"Invalid trim type for \" + f.getName());\n}","typeGuard":null,"tryCatchPattern":"try { meta.getFields(row, origin, info, transMeta, stepMeta); }\ncatch (KettleStepException e) {\n  Throwable cause = e.getCause();\n  log.error(\"getFields failed for CSV Input {}\", cause, cause);\n}","preventionTips":["Always set explicit name/type/trim type on every injected field","Run check() on the transformation before execution","Re-save imported steps to normalize field metadata"],"tags":["kettle","row-metadata","step-config"],"backgroundTag":"invalid-config-value","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"}