pentaho/pentaho-kettle · error · KettleException

Unable to find directory path '' + directoryPath + '' in…

Error message

Unable to find directory path '' + directoryPath + '' in the repository

What it means

KettleException thrown by ExecuteTransServlet.loadTransformation when repository.loadRepositoryDirectoryTree().findDirectory(directoryPath) returns null — the directory path in the trans parameter of the executeTrans request does not exist in the repository. Functionally identical to the ExecuteJobServlet equivalent, but with a hard-coded (non-localized) message.

Solutions

  1. Verify the directory exists in the repository via Spoon
  2. Fix the trans parameter path in the request URL
  3. Confirm the request targets the intended repository
  4. Check path case and slash formatting
  5. Re-create the directory if it was deleted and move the transformation back

Example fix

// before
String transParam = "/home/prod/etl_trans"; // dir renamed to /home/production
// after
String transParam = "/home/production/etl_trans";
Defensive patterns

Strategy: validation

Validate before calling

RepositoryDirectoryInterface dir =
  repository.loadRepositoryDirectoryTree().findDirectory( directoryPath );
if ( dir == null ) throw new IllegalArgumentException( "Unknown dir: " + directoryPath );

Try / catch

try {
  // executeTrans request
} catch ( KettleException e ) {
  if ( e.getMessage().startsWith( "Unable to find directory path" ) ) {
    LOG.error( "Fix trans parameter path: " + requestedPath );
  }
}

Prevention

When it happens

Trigger: GET /kettle/executeTrans/ with trans=/some/path/transname where /some/path cannot be resolved in the repository directory tree.

Common situations: Directory renamed/moved after the request URL was generated; typo in path; wrong repository; case-sensitivity mismatch; requests issued against a replica with stale repository metadata.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/www/ExecuteTransServlet.java:385

    } else {

      // With a repository we need to load it from /foo/bar/Transformation
      // We need to extract the folder name from the path in front of the name...
      //
      String directoryPath;
      String name;
      int lastSlash = trans.lastIndexOf( RepositoryDirectory.DIRECTORY_SEPARATOR );
      if ( lastSlash < 0 ) {
        directoryPath = "/";
        name = trans;
      } else {
        directoryPath = trans.substring( 0, lastSlash );
        name = trans.substring( lastSlash + 1 );
      }
      RepositoryDirectoryInterface directory =
        repository.loadRepositoryDirectoryTree().findDirectory( directoryPath );
      if ( directory == null ) {
        throw new KettleException( "Unable to find directory path '" + directoryPath + "' in the repository" );
      }

      ObjectId transformationID = repository.getTransformationID( name, directory );
      if ( transformationID == null ) {
        throw new KettleException( "Unable to find transformation '" + name + "' in directory :" + directory );
      }
      // TODO BACKLOG-44138 need to pass parent variablespace
      TransMeta transMeta = repository.loadTransformation( transformationID, null, parentVariableSpace );
      return transMeta;
    }
  }

  private Repository openRepository( String repositoryName, String user, String pass ) throws KettleException {

    if ( Utils.isEmpty( repositoryName ) ) {
      return null;
    }

View on GitHub (pinned to f3058517a1)