pentaho/pentaho-kettle · error · KettleXMLException
TransDependency.Exception.UnableToLoadTransformation
Error message
TransDependency.Exception.UnableToLoadTransformation
What it means
A KettleXMLException (message key TransDependency.Exception.UnableToLoadTransformation) thrown when a TransDependency cannot be parsed from its XML node: reading the 'connection', 'table', or 'field' tags failed. The original exception is attached as the cause.
Solutions
- Open the .ktr in Spoon and fix or delete the broken dependency entry under <dependencies>
- Validate the XML well-formedness of the transformation file
- Ensure each <dependency> has <connection>, <table>, and <field> child tags
- Re-save the transformation with a matching Kettle version
Example fix
// before: malformed <dependency><connection>db</connection></dependency> // after <dependency><connection>db</connection><table>lookup</table><field>id</field></dependency>
Defensive patterns
Strategy: try-catch
Validate before calling
// validate each dependency node has required tags before constructing
for (Node dep : deps) {
if (XMLHandler.getTagValue(dep, "connection") == null) throw new KettleException("dependency missing <connection>");
} Try / catch
try { TransDependency dep = new TransDependency(depNode, databases); } catch (KettleXMLException e) { log.error("Bad dependency XML: " + e.getCause(), e); } Prevention
- Do not hand-edit .ktr XML; use Spoon
- Keep source control on transformations to detect corruption
- Validate transformation XML after version migrations
When it happens
Trigger: Constructing TransDependency(Node depnode, List<DatabaseMeta> databases) from a .ktr XML where the dependency block is malformed or the XMLHandler calls throw.
Common situations: Hand-edited or truncated .ktr files; dependency XML generated by a different Kettle version with changed tags; corrupted repository export/import.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
- AppendMeta.Exception.UnableToLoadStepInfo
- LucidDBStreamingLoaderMeta.Exception.UnableToReadStepInfoFromXML
- RulesMeta.Error.LoadFromXML
- RulesMeta.Error.LoadFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/40be7c860ad2f32a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/TransDependency.java:73
StringBuilder xml = new StringBuilder( 200 );
xml.append( " " ).append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR );
xml.append( " " ).append( XMLHandler.addTagValue( "connection", db == null ? "" : db.getName() ) );
xml.append( " " ).append( XMLHandler.addTagValue( "table", tablename ) );
xml.append( " " ).append( XMLHandler.addTagValue( "field", fieldname ) );
xml.append( " " ).append( XMLHandler.closeTag( XML_TAG ) ).append( Const.CR );
return xml.toString();
}
public TransDependency( Node depnode, List<DatabaseMeta> databases ) throws KettleXMLException {
try {
String depcon = XMLHandler.getTagValue( depnode, "connection" );
db = DatabaseMeta.findDatabase( databases, depcon );
tablename = XMLHandler.getTagValue( depnode, "table" );
fieldname = XMLHandler.getTagValue( depnode, "field" );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "TransDependency.Exception.UnableToLoadTransformation" ), e );
}
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
public void setObjectId( ObjectId id ) {
this.id = id;
}
public ObjectId getObjectId() {
return id;
}
public void setDatabase( DatabaseMeta db ) {View on GitHub (pinned to f3058517a1)