{"record":{"id":"ddf92289d8659247","repo":"pentaho/pentaho-kettle","slug":"mappingdialog-exception-unabletofindrepositorydirectory","errorCode":"MappingDialog.Exception.UnableToFindRepositoryDirectory","errorMessage":"MappingDialog.Exception.UnableToFindRepositoryDirectory","messagePattern":"MappingDialog\\.Exception\\.UnableToFindRepositoryDirectory","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java","lineNumber":452,"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, \"MappingDialog.Exception.NoValidMappingDetailsFound\" ) );\n        }\n        RepositoryDirectoryInterface repdir = repository.findDirectory( realDirectory );\n        if ( repdir == null ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"MappingDialog.Exception.UnableToFindRepositoryDirectory\" ) );\n        }\n        loadRepositoryTrans( realTransname, repdir );\n        break;\n      default:\n        break;\n    }\n  }\n\n  private void getByReferenceData( ObjectId transObjectId ) {\n    try {\n      if ( repository == null ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"MappingDialog.Exception.NotConnectedToRepository.Message\" ) );\n      }\n      RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );\n      String path = DialogUtils\n        .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java#L434-L470","documentation":"Thrown by MappingDialog.loadTransformation when repository.findDirectory(realDirectory) returns null — the directory part of the mapping path exists syntactically but not in the connected repository. Loading of the sub-transformation is aborted.","triggerScenarios":"getData or ok invokes loadTransformation; the directory parsed from the mapping path is not found by the current repository connection.","commonSituations":"The sub-transformation folder was renamed/deleted, the developer is connected to a different repository (dev vs prod), or the mapping path references another project's folder.","solutions":["Verify the folder exists in the currently connected repository and reconnect to the correct one","Re-pick the mapping via the dialog's browse button to refresh the stored path","Correct the directory path in the Mapping step settings after any repository reorganization","Check for environment-specific path differences across dev/test/prod repositories"],"exampleFix":"// before\nmapping.setDirectoryPath(\"/deploy/old\");\n// after\nmapping.setDirectoryPath(\"/deploy/current\"); // folder confirmed in connected repo","handlingStrategy":"validation","validationCode":"if (repository != null && repository.findDirectory(dirPath) == null) throw new IllegalStateException(\"Mapping directory missing in repository: \" + dirPath);","typeGuard":null,"tryCatchPattern":"try { loadTransformation(); } catch (KettleException e) { // guide user to reconnect or re-browse the mapping }","preventionTips":["Reconnect to the right repository before editing mappings","Re-browse mappings after folder renames","Document environment-specific repository layouts"],"tags":["pentaho-kettle","swt-dialog","mapping","repository"],"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"}