{"record":{"id":"6b4f97dd54109584","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-directory-path-directorypath-in-the","errorCode":null,"errorMessage":"Unable to find directory path '' + directoryPath + '' in the repository","messagePattern":"Unable to find directory path '' \\+ directoryPath \\+ '' in the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/www/ExecuteTransServlet.java","lineNumber":385,"sourceCode":"    } else {\n\n      // With a repository we need to load it from /foo/bar/Transformation\n      // We need to extract the folder name from the path in front of the name...\n      //\n      String directoryPath;\n      String name;\n      int lastSlash = trans.lastIndexOf( RepositoryDirectory.DIRECTORY_SEPARATOR );\n      if ( lastSlash < 0 ) {\n        directoryPath = \"/\";\n        name = trans;\n      } else {\n        directoryPath = trans.substring( 0, lastSlash );\n        name = trans.substring( lastSlash + 1 );\n      }\n      RepositoryDirectoryInterface directory =\n        repository.loadRepositoryDirectoryTree().findDirectory( directoryPath );\n      if ( directory == null ) {\n        throw new KettleException( \"Unable to find directory path '\" + directoryPath + \"' in the repository\" );\n      }\n\n      ObjectId transformationID = repository.getTransformationID( name, directory );\n      if ( transformationID == null ) {\n        throw new KettleException( \"Unable to find transformation '\" + name + \"' in directory :\" + directory );\n      }\n      // TODO BACKLOG-44138 need to pass parent variablespace\n      TransMeta transMeta = repository.loadTransformation( transformationID, null, parentVariableSpace );\n      return transMeta;\n    }\n  }\n\n  private Repository openRepository( String repositoryName, String user, String pass ) throws KettleException {\n\n    if ( Utils.isEmpty( repositoryName ) ) {\n      return null;\n    }\n","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/ExecuteTransServlet.java#L367-L403","documentation":"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.","triggerScenarios":"GET /kettle/executeTrans/ with trans=/some/path/transname where /some/path cannot be resolved in the repository directory tree.","commonSituations":"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.","solutions":["Verify the directory exists in the repository via Spoon","Fix the trans parameter path in the request URL","Confirm the request targets the intended repository","Check path case and slash formatting","Re-create the directory if it was deleted and move the transformation back"],"exampleFix":"// before\nString transParam = \"/home/prod/etl_trans\"; // dir renamed to /home/production\n// after\nString transParam = \"/home/production/etl_trans\";","handlingStrategy":"validation","validationCode":"RepositoryDirectoryInterface dir =\n  repository.loadRepositoryDirectoryTree().findDirectory( directoryPath );\nif ( dir == null ) throw new IllegalArgumentException( \"Unknown dir: \" + directoryPath );","typeGuard":null,"tryCatchPattern":"try {\n  // executeTrans request\n} catch ( KettleException e ) {\n  if ( e.getMessage().startsWith( \"Unable to find directory path\" ) ) {\n    LOG.error( \"Fix trans parameter path: \" + requestedPath );\n  }\n}","preventionTips":["Resolve directory paths against the repository before building URLs","Synchronize directory renames with all request producers","Validate path casing for Linux-hosted repositories","Centralize repository path constants instead of duplicating literals"],"tags":["repository","directory","transformation","servlet"],"backgroundTag":"directory-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"}