{"record":{"id":"0f3555adab2f32ba","repo":"pentaho/pentaho-kettle","slug":"e","errorCode":null,"errorMessage":"e","messagePattern":"e","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesMetaMod.java","lineNumber":442,"sourceCode":"            v = ValueMetaFactory.cloneValueMeta( source, type[i] );\n            row.setValueMeta( valueIndex, v );\n          } else {\n            if ( !Utils.isEmpty( rename[i] ) ) {\n              v = ValueMetaFactory.createValueMeta( rename[i], type[i] );\n            } else {\n              v = ValueMetaFactory.createValueMeta( fieldname[i], type[i] );\n            }\n          }\n          v.setLength( length[i] );\n          v.setPrecision( precision[i] );\n          v.setOrigin( originStepname );\n          if ( !replace[i] ) {\n            row.addValueMeta( v );\n          }\n        }\n      }\n    } catch ( KettleException e ) {\n      throw new KettleStepException( e );\n    }\n  }\n\n  public String getXML() {\n    StringBuilder retval = new StringBuilder( 300 );\n\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"compatible\", compatible ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"optimizationLevel\", optimizationLevel ) );\n\n    retval.append( \"    <jsScripts>\" );\n    for ( int i = 0; i < jsScripts.length; i++ ) {\n      retval.append( \"      <jsScript>\" );\n      retval\n        .append( \"        \" ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_TYPE, jsScripts[i].getScriptType() ) );\n      retval\n        .append( \"        \" ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_NAME, jsScripts[i].getScriptName() ) );\n      retval.append( \"        \" ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_SCRIPT, jsScripts[i].getScript() ) );\n      retval.append( \"      </jsScript>\" );","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesMetaMod.java#L424-L460","documentation":"At the end of getFields(), any KettleException not already handled (e.g. from row.addValueMeta / clone operations) is wrapped in a new KettleStepException whose message is just the cause's toString ('e'). It signals the step failed while computing its output row metadata.","triggerScenarios":"getFields() throws a generic KettleException during value-type conversion or adding value metadata for one of the script's output/replace fields.","commonSituations":"Invalid type conversions configured in the step (e.g. converting a field to an incompatible type), null value metadata, or corrupted step metadata loaded from XML.","solutions":["Read the wrapped cause message to find the failing field/conversion.","Fix the value type / length / precision settings for the script's output fields.","Remove or repair the offending field entry in the step config.","Validate the transformation in Spoon to catch metadata issues earlier."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { step.getFields(...); } catch (KettleStepException e) {\n  Throwable cause = e.getCause(); // inspect cause for the real KettleException\n  logError('getFields failed: ' + cause, e);\n}","preventionTips":["Verify output field value types/lengths in the step config.","Preview the step to surface metadata conversion issues early.","Regenerate step metadata if loaded from old XML versions."],"tags":["kettle","row-metadata","step-config","wrapped-exception"],"backgroundTag":"schema-validation-failed","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"}