{"record":{"id":"f5182e8cbd6f7cf7","repo":"pentaho/pentaho-kettle","slug":"could-not-create-valuemetainterface-0","errorCode":null,"errorMessage":"Could not create ValueMetaInterface: {0}","messagePattern":"Could not create ValueMetaInterface: (.+?)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/transexecutor/TransExecutorMeta.java","lineNumber":548,"sourceCode":"      addFieldToRow( row, executionLogTextField, ValueMetaInterface.TYPE_STRING );\n      addFieldToRow( row, executionLogChannelIdField, ValueMetaInterface.TYPE_STRING, 50, 0 );\n\n    }\n  }\n\n  protected void addFieldToRow( RowMetaInterface row, String fieldName, int type ) throws KettleStepException {\n    addFieldToRow( row, fieldName, type, -1, -1 );\n  }\n\n  protected void addFieldToRow( RowMetaInterface row, String fieldName, int type, int length, int precision )\n    throws KettleStepException {\n    if ( !Utils.isEmpty( fieldName ) ) {\n      try {\n        ValueMetaInterface value = ValueMetaFactory.createValueMeta( fieldName, type, length, precision );\n        value.setOrigin( getParentStepMeta().getName() );\n        row.addValueMeta( value );\n      } catch ( KettlePluginException e ) {\n        throw new KettleStepException( BaseMessages.getString( PKG, \"TransExecutorMeta.ValueMetaInterfaceCreation\",\n          fieldName ), e );\n      }\n    }\n  }\n\n  void prepareExecutionResultsFileFields( RowMetaInterface row, StepMeta nextStep ) throws KettleStepException {\n    if ( nextStep != null && resultFilesTargetStepMeta != null && nextStep.equals( resultFilesTargetStepMeta ) ) {\n      addFieldToRow( row, resultFilesFileNameField, ValueMetaInterface.TYPE_STRING );\n    }\n  }\n\n  void prepareResultsRowsFields( RowMetaInterface row ) throws KettleStepException {\n    for ( int i = 0; i < outputRowsField.length; i++ ) {\n      addFieldToRow( row, outputRowsField[ i ], outputRowsType[ i ], outputRowsLength[ i ], outputRowsPrecision[ i ] );\n    }\n  }\n\n  @Override","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/transexecutor/TransExecutorMeta.java#L530-L566","documentation":"TransExecutorMeta wraps a sub-transformation and can copy fields from the sub-transformation's execution results into the main stream. When building the output row metadata it calls ValueMetaFactory.createValueMeta for each configured result field; if the value metadata plugin for the requested type cannot be instantiated (KettlePluginException), it rethrows as KettleStepException with this message naming the offending field.","triggerScenarios":"addFieldToRow is called during output-row metadata preparation (via prepareExecutionResultsFields, prepareResultsRowsFields, or recursively via addFieldToRow) with a non-empty fieldName whose type/length/precision combination cannot be resolved to a ValueMetaInterface plugin — e.g. an unknown or unregistered value type.","commonSituations":"Running a Pentaho/Kettle version where a value meta plugin was renamed or removed; a transformation saved by a newer version references a value type the current installation cannot instantiate; corrupt step configuration in the .ktr producing an invalid type id.","solutions":["Check the full stack trace's cause (KettlePluginException) to identify the value type/plugin that failed to load","Upgrade or reinstall Pentaho Kettle/engine so the ValueMeta plugin for the field type is present","Re-open the TransExecutor step in Spoon, re-select each result field and its type, and re-save the transformation","If a custom ValueMeta plugin is involved, verify it is on the classpath and registered"],"exampleFix":"// before (broken plugin resolution)\nValueMetaInterface value = ValueMetaFactory.createValueMeta( fieldName, type, length, precision );\n// after: guard with a known-good type before building metadata\nint safeType = ValueMetaFactory.getIdForValueMeta( \"String\" );\nValueMetaInterface value = ValueMetaFactory.createValueMeta( fieldName, type > 0 ? type : safeType, length, precision );","handlingStrategy":"try-catch","validationCode":"// Java: verify the value type can be instantiated before running the trans\ntry {\n  ValueMetaFactory.createValueMeta( fieldName, type, length, precision );\n} catch ( KettlePluginException e ) {\n  throw new IllegalStateException( \"Unusable value type \" + type + \" for field \" + fieldName, e );\n}","typeGuard":"boolean isKnownValueType(int type) {\n  try { ValueMetaFactory.createValueMeta( \"check\", type, -1, -1 ); return true; }\n  catch ( KettlePluginException e ) { return false; }\n}","tryCatchPattern":"try {\n  transExecutorMeta.prepareExecutionResultsFields( rowMeta, nextStepMeta, subTransMeta );\n} catch ( KettleStepException e ) {\n  if ( e.getMessage().contains( \"ValueMetaInterface\" ) ) {\n    // inspect cause KettlePluginException, fix field type config or install missing plugin\n  }\n  throw e;\n}","preventionTips":["Keep Kettle/plugin versions aligned across design and runtime environments","Re-open and re-save result-field definitions after version upgrades","Always check the cause chain for the underlying KettlePluginException"],"tags":["kettle","value-metadata","plugin","transformation"],"backgroundTag":"missing-dependency","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"}