pentaho/pentaho-kettle · error · KettleValueException
No data output data type was specified for new field
Error message
No data output data type was specified for new field [${fieldName}] What it means
JavaScriptUtils.convertFromJs() converts a Rhino/Nashorn JS value to a Java object for a target field. When the target field's type is ValueMetaInterface.TYPE_NONE (no output data type specified), the switch has no conversion to apply and throws KettleValueException with this message. It means a JavaScript step's new output field lacks a declared data type.
Solutions
- Set an explicit data type (String, Number, Date, BigNumber, Boolean, Binary) for the new field in the JavaScript step's output fields list.
- In the script, explicitly type the field if using APIs that register fields, rather than leaving type NONE.
- Review the transformation metadata (XML/ktr) to ensure <type> is not NONE/0 for that field.
Example fix
// before (step field config) fieldName=outputField, type=None // after fieldName=outputField, type=String // (or Number/Date/BigNumber as required)
Defensive patterns
Strategy: validation
Validate before calling
if (field.getType() == ValueMetaInterface.TYPE_NONE) {
throw new KettleException("Output field '" + field.getName() + "' has no data type; set String/Number/Date/etc.");
} Try / catch
try {
Object result = JavaScriptUtils.convertFromJs(context, value, fieldName, classType);
} catch (KettleValueException e) {
throw new KettleException("Set a data type for field " + fieldName + " in the JavaScript step fields grid", e);
} Prevention
- Always assign an explicit type to every output field in the Modified Java Script Value step.
- Review transformation XML/ktr for <type>0</type> (NONE) entries after copy-paste or upgrades.
- Use the step's 'Get variables'/type detection features so fields get concrete types.
When it happens
Trigger: A JavaScript step (Modified Java Script Value) defines a new output field whose ValueMeta has type TYPE_NONE — i.e. the field's type was left as 'None'/unspecified — and convertFromJs is invoked on that field.
Common situations: Transformation designer added a field in the script but never set the output field type in the step's fields grid (left as 'None'); upgrade or copy-paste dropped the type metadata; dynamic field creation without specifying type.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Can't convert a string to a date
- JavaScript conversion to BigNumber not implemented for
- Merge operation ' ' is not defined.
- PropertyOutput.Log.ErrorFindingField
- PropertyOutput.Log.FilenameInFieldEmpty
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7ce17bcb2bce6326.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/util/JavaScriptUtils.java:66
return jsToInteger( value, value.getClass() );
case ValueMetaInterface.TYPE_STRING:
return jsToString( value, classType );
case ValueMetaInterface.TYPE_DATE:
return jsToDate( value, classType );
case ValueMetaInterface.TYPE_BOOLEAN:
return value;
case ValueMetaInterface.TYPE_BIGNUMBER:
return jsToBigNumber( value, classType );
case ValueMetaInterface.TYPE_BINARY:
return Context.jsToJava( value, byte[].class );
case ValueMetaInterface.TYPE_NONE:
throw new KettleValueException( "No data output data type was specified for new field ["
+ fieldName + "]" );
default:
return Context.jsToJava( value, Object.class );
}
}
public static Number jsToNumber( Object value, String classType ) {
if ( classType.equalsIgnoreCase( JS_UNDEFINED ) ) {
return null;
} else if ( classType.equalsIgnoreCase( JS_NATIVE_JAVA_OBJ ) ) {
try {
// Is it a java Value class ?
Value v = (Value) Context.jsToJava( value, Value.class );
return v.getNumber();
} catch ( Exception e ) {
String string = Context.toString( value );
return Double.parseDouble( Const.trim( string ) );View on GitHub (pinned to f3058517a1)