pentaho/pentaho-kettle · error · KettleXMLException
ScriptValuesMetaMod.Exception.UnableToLoadStepInfoFromXML
Error message
ScriptValuesMetaMod.Exception.UnableToLoadStepInfoFromXML
What it means
ScriptValuesMetaMod.readData(), invoked from loadXML when deserializing the step from a .ktr transformation file, wraps XML parsing in a try/catch and re-throws as a KettleXMLException with the localized message 'UnableToLoadStepInfoFromXML'. It means the step's XML block is malformed or missing expected tags.
Solutions
- Open the .ktr in Spoon and inspect the ScriptValuesMod step XML; fix malformed tags.
- Restore the transformation from backup or version control.
- Compare the failing step XML against a working transformation's step XML.
- Check the cause (nested exception) logged with the KettleXMLException for the exact parse failure.
Defensive patterns
Strategy: try-catch
Try / catch
try { trans.loadXML(file, monitor, false); } catch (KettleXMLException e) {
logError('Failed to load step from XML: ' + e.getMessage(), e.getCause());
} Prevention
- Do not hand-edit .ktr files; edit in Spoon.
- Keep transformations in version control for restoration.
- Match Pentaho versions when moving transformations between environments.
When it happens
Trigger: Loading a transformation whose <step type='ScriptValueMod'> XML contains unexpected structure or invalid values (e.g. non-numeric length/precision).
Common situations: Hand-edited .ktr files, transformations produced by older/newer Pentaho versions with schema drift, or truncated/corrupted files.
Related errors
- RulesMeta.Error.LoadFromXML
- RulesMeta.Error.LoadFromXML
- Unable to load step info from XML
- AbortMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepo…
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a215898a0b569440.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesMetaMod.java:363
int nrfields = XMLHandler.countNodes( fields, "field" );
allocate( nrfields );
for ( int i = 0; i < nrfields; i++ ) {
Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );
fieldname[i] = XMLHandler.getTagValue( fnode, "name" );
rename[i] = XMLHandler.getTagValue( fnode, "rename" );
type[i] = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fnode, "type" ) );
String slen = XMLHandler.getTagValue( fnode, "length" );
String sprc = XMLHandler.getTagValue( fnode, "precision" );
length[i] = Const.toInt( slen, -1 );
precision[i] = Const.toInt( sprc, -1 );
replace[i] = "Y".equalsIgnoreCase( XMLHandler.getTagValue( fnode, "replace" ) );
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "ScriptValuesMetaMod.Exception.UnableToLoadStepInfoFromXML" ), e );
}
}
public void setDefault() {
jsScripts = new ScriptValuesScript[1];
jsScripts[0] =
new ScriptValuesScript( ScriptValuesScript.TRANSFORM_SCRIPT, BaseMessages.getString(
PKG, "ScriptValuesMod.Script1" ), "//"
+ BaseMessages.getString( PKG, "ScriptValuesMod.ScriptHere" ) + Const.CR + Const.CR );
int nrfields = 0;
allocate( nrfields );
for ( int i = 0; i < nrfields; i++ ) {
fieldname[i] = "newvalue";
rename[i] = "newvalue";
type[i] = ValueMetaInterface.TYPE_NUMBER;View on GitHub (pinned to f3058517a1)