{"record":{"id":"781963165468c5d3","repo":"pentaho/pentaho-kettle","slug":"transmeta-exception-errorreadingtransformation","errorCode":null,"errorMessage":"TransMeta.Exception.ErrorReadingTransformation","messagePattern":"TransMeta\\.Exception\\.ErrorReadingTransformation","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/TransMeta.java","lineNumber":3730,"sourceCode":"\n        // Is this a slave transformation?\n        //\n        slaveTransformation = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( transnode, \"slave_transformation\" ) );\n        if ( log.isDebug() ) {\n          log.logDebug( BaseMessages.getString( PKG, \"TransMeta.Log.NumberOfStepsReaded\" ) + nrSteps() );\n          log.logDebug( BaseMessages.getString( PKG, \"TransMeta.Log.NumberOfHopsReaded\" ) + nrTransHops() );\n        }\n        sortSteps();\n\n        // Load the attribute groups map\n        //\n        attributesMap = AttributesUtil.loadAttributes( XMLHandler.getSubNode( transnode, AttributesUtil.XML_TAG ) );\n\n        keyForSessionKey = XMLHandler.stringToBinary( XMLHandler.getTagValue( infonode, \"key_for_session_key\" ) );\n        isKeyPrivate = \"Y\".equals( XMLHandler.getTagValue( infonode, \"is_key_private\" ) );\n\n      } catch ( KettleXMLException xe ) {\n        throw new KettleXMLException( BaseMessages.getString( PKG, \"TransMeta.Exception.ErrorReadingTransformation\" ),\n            xe );\n      } catch ( KettleException e ) {\n        throw new KettleXMLException( e );\n      } finally {\n        initializeVariablesFrom( null );\n        if ( setInternalVariables ) {\n          setInternalKettleVariables();\n        }\n\n        ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.TransformationMetaLoaded.id, this );\n      }\n    } catch ( Exception e ) {\n      // See if we have missing plugins to report, those take precedence!\n      //\n      if ( !missingPluginsException.getMissingPluginDetailsList().isEmpty() ) {\n        throw missingPluginsException;\n      } else {\n        throw new KettleXMLException( BaseMessages.getString( PKG, \"TransMeta.Exception.ErrorReadingTransformation\" ),","sourceCodeStart":3712,"sourceCodeEnd":3748,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/TransMeta.java#L3712-L3748","documentation":"Inside loadXML(transnode, ...), any KettleXMLException raised while reading the transformation node's sub-elements (info node, attributes, logging tables, etc.) is re-wrapped as KettleXMLException with TransMeta.Exception.ErrorReadingTransformation, chaining the original cause. It signals a structural problem in the transformation XML content itself.","triggerScenarios":"new TransMeta(fname) or loadXML() on a .ktr whose inner elements are malformed for Kettle's expected schema: missing <info> node, invalid attributes XML, bad logging-table definitions, unexpected nested tags.","commonSituations":"Hand-edited .ktr files; transformations saved by a newer/older Pentaho version with changed schema; truncated downloads; third-party generators writing non-conformant XML.","solutions":["Inspect the chained cause (xe) to find the exact XML element that failed","Re-save the transformation in Spoon to normalize it to your Kettle version's schema","Align the PDI client/plugin versions used to create and to load the .ktr"],"exampleFix":"// before\n} catch (KettleXMLException xe) {\n  throw xe; // unclear where it failed\n}\n// after\n} catch (KettleXMLException xe) {\n  throw new KettleXMLException(BaseMessages.getString(PKG, \"TransMeta.Exception.ErrorReadingTransformation\"), xe);\n} // then log/print xe.getCause() to locate the offending node","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXML(transnode, fname, metaStore, rep, true, variableSpace, null);\n} catch (KettleXMLException e) {\n  Throwable cause = e.getCause();\n  logger.error(\"Error reading transformation {}: {}\", fname, cause == null ? e.getMessage() : cause.getMessage(), e);\n  throw e;\n}","preventionTips":["Always log the chained cause — the real failure is in the wrapped exception","Avoid hand-editing .ktr files; round-trip through Spoon instead","Keep the loading PDI version at or above the version that saved the file"],"tags":["xml","transformation","parsing"],"backgroundTag":"json-unmarshal-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"}