pentaho/pentaho-kettle · error · KettleException

MetaInjectMeta.Exception.UnableToLoadTransformationFromRepos…

Error message

MetaInjectMeta.Exception.UnableToLoadTransformationFromRepository

What it means

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.

Solutions

  1. Verify that transformation name and directory as printed in the message actually exist in the repository.
  2. Correct or define the variables used for the directory so substitution yields a valid path.
  3. Re-link the Meta Inject step to the transformation via the browse dialog.
  4. Check repository permissions for the folder.

Example fix

// before: variable not defined in run environment
String dir = "${ETL_HOME}/sub"; // resolves literally
// after: define ETL_HOME or use internal variable
String dir = "${Internal.Transformation.Filename.Directory}";
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check directory + name resolution
if (Utils.isEmpty(realDirectory) || Utils.isEmpty(realTransname)) {
  throw new IllegalStateException("Transformation name/directory unresolved; check variables");
}

Try / catch

try {
  loadFromRepository();
} catch (KettleException e) {
  logError("Unable to load from repository: " + realTransname + " in " + realDirectory, e);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/085c14df6ffc5953. Report an issue: GitHub.

Appendix: source

Thrown at plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java:587

        String realDirectory = tmpSpace.environmentSubstitute( injectMeta.getDirectoryPath() );
        if ( rep != null ) {
          if ( !Utils.isEmpty( realTransname ) && !Utils.isEmpty( realDirectory ) && rep != null ) {
            RepositoryDirectoryInterface repdir = rep.findDirectory( realDirectory );
            if ( repdir != null ) {
              try {
                // reads the last revision in the repository...
                //
                // TODO: FIXME: see if we need to pass external MetaStore references to the repository?
                //
                mappingTransMeta = rep.loadTransformation( realTransname, repdir, null, true, null );

                mappingTransMeta.getLogChannel().logDetailed( "Loading Mapping from repository",
                  "Mapping transformation [" + realTransname + "] was loaded from the repository" );
              } catch ( Exception e ) {
                throw new KettleException( "Unable to load transformation [" + realTransname + "]", e );
              }
            } else {
              throw new KettleException( BaseMessages.getString( PKG,
                "MetaInjectMeta.Exception.UnableToLoadTransformationFromRepository", realTransname, realDirectory ) );
            }
          }
        } else {
          try {
            mappingTransMeta =
              new TransMeta( bowl, realDirectory + "/" + realTransname, metaStore, rep, true, tmpSpace, null );
          } catch ( KettleException ke ) {
            try {
              // add .ktr extension and try again
              mappingTransMeta =
                new TransMeta( bowl, realDirectory + "/" + realTransname + "." + Const.STRING_TRANS_DEFAULT_EXT,
                  metaStore, rep, true, tmpSpace, null );
            } catch ( KettleException ke2 ) {
              throw new KettleException( BaseMessages.getString( PKG, "StepWithMappingMeta.Exception.UnableToLoadTrans",
                realTransname ) + realDirectory );
            }
          }

View on GitHub (pinned to f3058517a1)