{"record":{"id":"085c14df6ffc5953","repo":"pentaho/pentaho-kettle","slug":"metainjectmeta-exception","errorCode":null,"errorMessage":"MetaInjectMeta.Exception.UnableToLoadTransformationFromRepository","messagePattern":"MetaInjectMeta\\.Exception\\.UnableToLoadTransformationFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java","lineNumber":587,"sourceCode":"        String realDirectory = tmpSpace.environmentSubstitute( injectMeta.getDirectoryPath() );\n        if ( rep != null ) {\n          if ( !Utils.isEmpty( realTransname ) && !Utils.isEmpty( realDirectory ) && rep != null ) {\n            RepositoryDirectoryInterface repdir = rep.findDirectory( realDirectory );\n            if ( repdir != null ) {\n              try {\n                // reads the last revision in the repository...\n                //\n                // TODO: FIXME: see if we need to pass external MetaStore references to the repository?\n                //\n                mappingTransMeta = rep.loadTransformation( realTransname, repdir, null, true, null );\n\n                mappingTransMeta.getLogChannel().logDetailed( \"Loading Mapping from repository\",\n                  \"Mapping transformation [\" + realTransname + \"] was loaded from the repository\" );\n              } catch ( Exception e ) {\n                throw new KettleException( \"Unable to load transformation [\" + realTransname + \"]\", e );\n              }\n            } else {\n              throw new KettleException( BaseMessages.getString( PKG,\n                \"MetaInjectMeta.Exception.UnableToLoadTransformationFromRepository\", realTransname, realDirectory ) );\n            }\n          }\n        } else {\n          try {\n            mappingTransMeta =\n              new TransMeta( bowl, realDirectory + \"/\" + realTransname, metaStore, rep, true, tmpSpace, null );\n          } catch ( KettleException ke ) {\n            try {\n              // add .ktr extension and try again\n              mappingTransMeta =\n                new TransMeta( bowl, realDirectory + \"/\" + realTransname + \".\" + Const.STRING_TRANS_DEFAULT_EXT,\n                  metaStore, rep, true, tmpSpace, null );\n            } catch ( KettleException ke2 ) {\n              throw new KettleException( BaseMessages.getString( PKG, \"StepWithMappingMeta.Exception.UnableToLoadTrans\",\n                realTransname ) + realDirectory );\n            }\n          }","sourceCodeStart":569,"sourceCodeEnd":605,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java#L569-L605","documentation":"In the REPOSITORY_BY_NAME branch, when the referenced transformation cannot be loaded by name (e.g. the directory lookup returned null or the transformation is absent), MetaInjectMeta throws a KettleException with the localized MetaInjectMeta.Exception.UnableToLoadTransformationFromRepository message passing the transformation name and directory. Unlike 3235 this is thrown without a cause when the preconditions to even attempt the load fail.","triggerScenarios":"loadTransformation with REPOSITORY_BY_NAME where the repository directory object (repdir) or transformation cannot be resolved, so the load is skipped and the guard clause throws.","commonSituations":"Transformation deleted or renamed in the repository; directory path contains a typo or unsubstituted variable; repository contains the transformation under a different folder after a migration.","solutions":["Verify that transformation name and directory as printed in the message actually exist in the repository.","Correct or define the variables used for the directory so substitution yields a valid path.","Re-link the Meta Inject step to the transformation via the browse dialog.","Check repository permissions for the folder."],"exampleFix":"// before: variable not defined in run environment\nString dir = \"${ETL_HOME}/sub\"; // resolves literally\n// after: define ETL_HOME or use internal variable\nString dir = \"${Internal.Transformation.Filename.Directory}\";","handlingStrategy":"validation","validationCode":"// Pre-check directory + name resolution\nif (Utils.isEmpty(realDirectory) || Utils.isEmpty(realTransname)) {\n  throw new IllegalStateException(\"Transformation name/directory unresolved; check variables\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  loadFromRepository();\n} catch (KettleException e) {\n  logError(\"Unable to load from repository: \" + realTransname + \" in \" + realDirectory, e);\n}","preventionTips":["Define all directory variables in the runtime environment","Re-link steps after moving transformations between folders","Keep names stable; avoid renaming repository objects in use"],"tags":["repository","kettle","meta-inject","entity-not-found"],"backgroundTag":"entity-not-found","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"}