{"record":{"id":"30dc079324731cbd","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-transformation-transname","errorCode":null,"errorMessage":"Unable to load transformation [{transName}]","messagePattern":"Unable to load transformation \\[(.+?)\\]","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":584,"sourceCode":"\n      case REPOSITORY_BY_NAME:\n        String realTransname = tmpSpace.environmentSubstitute( injectMeta.getTransName() );\n        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\",","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java#L566-L602","documentation":"For specification method REPOSITORY_BY_NAME, MetaInjectMeta looks up the transformation's repository directory and calls rep.loadTransformation(realTransname, repdir, ...). Any exception loading it is wrapped in a KettleException with this message naming the transformation. The injection target could not be fetched from the repository.","triggerScenarios":"loadTransformation with REPOSITORY_BY_NAME where the named transformation does not exist in realDirectory, the repository is unreachable, or loadTransformation throws (permissions, corrupt object).","commonSituations":"Transformation renamed or moved to another repository folder; connecting to the wrong repository; directory variables (${Internal....}) resolving incorrectly; repository login lacks read permission.","solutions":["Confirm the transformation name and directory exist in the connected repository.","Verify the repository connection is valid and the user can read the object.","Check that ${Internal.Transformation.Filename.Directory} or the configured directory variable resolves to the intended folder.","Alternatively switch specification to 'by reference' to avoid name-based lookups."],"exampleFix":"// before: hardcoded directory after a repo reorg\nString dir = \"/prod/etl\";\n// after: use the current transformation's directory\nString dir = \"${Internal.Transformation.Filename.Directory}\";","handlingStrategy":"validation","validationCode":"// Confirm the transformation exists in the repository before loading\nObjectId dirId = rep.getDirectoryID(realDirectory);\nif (dirId == null) throw new IllegalStateException(\"Directory missing: \" + realDirectory);\nObjectId trId = rep.getTransformationID(realTransname, dirId);\nif (trId == null) throw new IllegalStateException(\"Transformation missing: \" + realTransname);","typeGuard":null,"tryCatchPattern":"try {\n  mappingTransMeta = rep.loadTransformation(realTransname, repdir, null, true, null);\n} catch (KettleException e) {\n  logError(\"Repository load of \" + realTransname + \" failed: \" + e.getCause(), e);\n}","preventionTips":["Prefer 'specify by reference' over by-name lookups","Verify names/paths after repository reorganizations","Confirm repository user permissions"],"tags":["repository","kettle","meta-inject","transformation-loading"],"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"}