pentaho/pentaho-kettle · error · KettleException

SingleThreaderDialog.Exception.UnableToFindRepositoryDirecto…

Error message

SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory)

What it means

Thrown by MetaInjectDialog when resolving a repository transformation by name: repository.findDirectory(realDirectory) returns null because the directory portion of the given path does not exist in the repository. Note the message key itself has a stray trailing ')' — a known cosmetic bug in the message bundle. The dialog cannot load the referenced transformation.

Solutions

  1. Verify the directory part of the path exists in the currently connected repository (Browse in the repository explorer)
  2. Fix typos or case mismatches in the directory path in the transformation field
  3. Connect to the correct repository that contains the transformation path
  4. Re-select the transformation via the Browse dialog to regenerate a valid path

Example fix

// before
String transPath = '/home/oldAdmin/jobTrans'; // dir deleted
// after
String transPath = '/home/admin/jobTrans'; // existing repository directory
Defensive patterns

Strategy: validation

Validate before calling

// Verify the repository directory exists before resolving the transformation
RepositoryDirectoryInterface dir = repository.findDirectory('/home/admin');
if (dir == null) throw new IllegalStateException('Repository directory does not exist');

Type guard

boolean repoDirExists(Repository repo, String path) {
  try { return repo != null && repo.findDirectory(path) != null; }
  catch (Exception e) { return false; }
}

Try / catch

try {
  // load by repository path
} catch (KettleException e) {
  if (e.getMessage().contains('UnableToFindRepositoryDirectory')) {
    log.error('Directory part of path missing in repository: fix path or connect to correct repo', e);
  } else throw e;
}

Prevention

When it happens

Trigger: In the Meta Inject dialog (repository by name mode), the transPath's directory substring (everything before the last '/') is passed to repository.findDirectory() and no matching repository directory exists — typo, deleted folder, or different repository.

Common situations: Path copied from another repository/environment where the folder doesn't exist; directory renamed after the dialog value was saved; wrong repository connected; case-sensitive directory mismatch.

Related errors


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

Appendix: source

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

          filename = filename.replace( ".ktr", "" );
          wPath.setText( filename );
        }
        String transPath = transMeta.environmentSubstitute( filename );
        String realTransname = transPath;
        String realDirectory = "";
        int index = transPath.lastIndexOf( "/" );
        if ( index != -1 ) {
          realTransname = transPath.substring( index + 1 );
          realDirectory = transPath.substring( 0, index );
        }

        if ( Utils.isEmpty( realDirectory ) || Utils.isEmpty( realTransname ) ) {
          throw new KettleException(
            BaseMessages.getString( PKG, "SingleThreaderDialog.Exception.NoValidMappingDetailsFound" ) );
        }
        RepositoryDirectoryInterface repdir = repository.findDirectory( realDirectory );
        if ( repdir == null ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory)" ) );
        }
        loadRepositoryTrans( realTransname, repdir );
        break;
      case REPOSITORY_BY_REFERENCE:
        if ( referenceObjectId == null ) {
          return false;
        }
        injectTransMeta = repository.loadTransformation( referenceObjectId, null ); // load the last version
        injectTransMeta.clearChanged();
        break;
      default:
        break;
    }
    return true;
  }

  public void setActive() {

View on GitHub (pinned to f3058517a1)