{"record":{"id":"2a5c7c5bf81fcdbf","repo":"pentaho/pentaho-kettle","slug":"unknown-conversion-from-typedesc-into-destinationtype","errorCode":null,"errorMessage":"Unknown conversion from <typeDesc> into <destinationType>","messagePattern":"Unknown conversion from <typeDesc> into <destinationType>","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/RowMetaAndData.java","lineNumber":422,"sourceCode":"          return converter.number2intPrimitive( vn );\n        } else if ( Integer.class.isAssignableFrom( destinationType ) ) {\n          return converter.number2integer( vn );\n        } else if ( long.class.isAssignableFrom( destinationType ) ) {\n          return converter.number2longPrimitive( vn );\n        } else if ( Long.class.isAssignableFrom( destinationType ) ) {\n          return converter.number2long( vn );\n        } else if ( boolean.class.isAssignableFrom( destinationType ) ) {\n          return converter.number2booleanPrimitive( vn );\n        } else if ( Boolean.class.isAssignableFrom( destinationType ) ) {\n          return converter.number2boolean( vn );\n        } else if ( destinationType.isEnum() ) {\n          return converter.number2enum( destinationType, vn );\n        } else {\n          throw new RuntimeException( \"Wrong value conversion to \" + destinationType );\n        }\n    }\n\n    throw new KettleValueException( \"Unknown conversion from \" + metaType.getTypeDesc() + \" into \" + destinationType );\n  }\n\n  public void removeValue( String valueName ) throws KettleValueException {\n    int index = rowMeta.indexOfValue( valueName );\n    if ( index < 0 ) {\n      throw new KettleValueException( \"Unable to find '\" + valueName + \"' in the row\" );\n    }\n    removeValue( index );\n  }\n\n  public void removeValue( int index ) {\n    rowMeta.removeValueMeta( index );\n    data = RowDataUtil.removeItem( data, index );\n  }\n\n  public void mergeRowMetaAndData( RowMetaAndData rowMetaAndData, String originStepName ) {\n    int originalMetaSize = rowMeta.size();\n    rowMeta.mergeRowMeta( rowMetaAndData.getRowMeta(), originStepName );","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/RowMetaAndData.java#L404-L440","documentation":"Thrown at the end of getAsJavaType() when the source field's ValueMetaInterface type is not one of the handled types in the switch (String, Boolean, Integer, Number). Unlike the per-case RuntimeExceptions (errors 111/113-115), this is a KettleValueException reporting both the source type description and the requested destination type.","triggerScenarios":"Calling setProperty/getAsJavaType where the row field's meta type is, e.g., TYPE_DATE, TYPE_TIMESTAMP, TYPE_BINARY, or TYPE_BIGNUMBER — types not handled by the switch — regardless of destinationType.","commonSituations":"Metadata injection sourced from Date or Timestamp fields (e.g. from a Table Input or Get System Info step); binary/large-object fields feeding the injector.","solutions":["Convert the source field to a supported type (String, Integer, Number, Boolean) before injection, e.g. via a Select Values or Calculator step","Pre-format Date/Timestamp fields as strings and inject as TYPE_STRING","Catch KettleValueException and validate field types against the supported set before injecting","Upgrade Kettle/Pentaho if a newer version added support for the type"],"exampleFix":"// before\nrow.getAsJavaType(\"created_at\", String.class, converter); // Date field\n// after\nrowMeta.setValueMeta(idx, new ValueMetaString(\"created_at\")); // convert first\nrow.getAsJavaType(\"created_at\", String.class, converter);","handlingStrategy":"validation","validationCode":"int idx = row.getRowMeta().indexOfValue(name);\nint t = row.getRowMeta().getValueMeta(idx).getType();\nif (t != ValueMetaInterface.TYPE_STRING && t != ValueMetaInterface.TYPE_INTEGER\n  && t != ValueMetaInterface.TYPE_NUMBER && t != ValueMetaInterface.TYPE_BOOLEAN) {\n  throw new IllegalArgumentException(\"Unsupported source type \" + row.getRowMeta().getValueMeta(idx).getTypeDesc()\n    + \" for injection field \" + name);\n}","typeGuard":"boolean isInjectionSourceSupported(ValueMetaInterface vm) {\n  int t = vm.getType();\n  return t == ValueMetaInterface.TYPE_STRING || t == ValueMetaInterface.TYPE_INTEGER\n    || t == ValueMetaInterface.TYPE_NUMBER || t == ValueMetaInterface.TYPE_BOOLEAN;\n}","tryCatchPattern":"try {\n  Object v = row.getAsJavaType(name, destType, converter);\n} catch (KettleValueException e) {\n  if (e.getMessage().startsWith(\"Unknown conversion from\")) {\n    log.error(\"Unsupported source field type for injection: \" + e.getMessage(), e);\n  } else throw e;\n}","preventionTips":["Convert Date/Timestamp/Binary/BigNumber fields to String or Number before injection","Enumerate row meta types and validate against the supported set before injection","Prefer Calculator/Select Values steps to normalize source field types"],"tags":["kettle","metadata-injection","unsupported-type","conversion"],"backgroundTag":"unsupported-operation","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"}