{"record":{"id":"901296d505029356","repo":"pentaho/pentaho-kettle","slug":"singlethreaderdialog-exception-901296","errorCode":null,"errorMessage":"SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory)","messagePattern":"SingleThreaderDialog\\.Exception\\.UnableToFindRepositoryDirectory\\)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/trans/steps/singlethreader/SingleThreaderDialog.java","lineNumber":549,"sourceCode":"          filename = filename.replace( \".ktr\", \"\" );\n          wPath.setText( filename );\n        }\n        String transPath = transMeta.environmentSubstitute( filename );\n        String realTransname = transPath;\n        String realDirectory = \"\";\n        int index = transPath.lastIndexOf( \"/\" );\n        if ( index != -1 ) {\n          realTransname = transPath.substring( index + 1 );\n          realDirectory = transPath.substring( 0, index );\n        }\n\n        if ( Utils.isEmpty( realDirectory ) || Utils.isEmpty( realTransname ) ) {\n          throw new KettleException(\n            BaseMessages.getString( PKG, \"SingleThreaderDialog.Exception.NoValidMappingDetailsFound\" ) );\n        }\n        RepositoryDirectoryInterface repdir = repository.findDirectory( realDirectory );\n        if ( repdir == null ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory)\" ) );\n        }\n        loadRepositoryTrans( realTransname, repdir );\n        break;\n      case REPOSITORY_BY_REFERENCE:\n        mappingTransMeta = repository.loadTransformation( referenceObjectId, null ); // load the last version\n        mappingTransMeta.clearChanged();\n        break;\n      default:\n        break;\n    }\n\n    wInjectStep.setText( getInjectorStep( mappingTransMeta ) );\n  }\n\n  /**\n   * Copy information from the meta-data input to the dialog fields.\n   */","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/trans/steps/singlethreader/SingleThreaderDialog.java#L531-L567","documentation":"SingleThreaderDialog.loadTransformation resolves the directory part of the sub-transformation path with repository.findDirectory(realDirectory). A null result (no such directory in the repository) triggers this KettleException keyed to SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory) — note the stray closing paren in the message key, which also means the properties entry must literally include the ')'.","triggerScenarios":"Loading the Single Threader mapping by repository name where the directory prefix of the stored path does not exist in the connected repository.","commonSituations":"Sub-transformation folder renamed/deleted after reference was saved; pointing at a different repository; case-sensitive path mismatches; migrated transformations.","solutions":["Reselect the sub-transformation in the Single Threader dialog to refresh the path","Confirm the directory exists in the Repository explorer of the connected repository","Ensure you are connected to the repository where the sub-transformation lives","If fixing message bundles, define the key exactly as \"SingleThreaderDialog.Exception.UnableToFindRepositoryDirectory)\" including the paren, or correct the key in code"],"exampleFix":"// before\nString transPath = \"/deleted-dir/sub-trans\"; // findDirectory -> null\n// after\nString transPath = \"/public/flows/sub-trans\"; // existing directory","handlingStrategy":"validation","validationCode":"// Java: confirm the target directory exists before loading\nRepositoryDirectoryInterface dir = repository.findDirectory( realDirectory );\nif ( dir == null ) throw new IllegalStateException( \"Directory not found: \" + realDirectory );","typeGuard":"boolean dirExists = realDirectory != null && repository.findDirectory( realDirectory ) != null;","tryCatchPattern":"try { loadSubTrans( path ); } catch ( KettleException e ) { showRepositoryBrowserToReselect(); }","preventionTips":["Avoid renaming/deleting directories holding referenced sub-transformations without updating references","Check repository connectivity and correct repo before loading","Note the message key contains a stray ')' — keep properties keys in sync with code"],"tags":["repository","singlethreader","directory-not-found","ui"],"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"}