{"record":{"id":"cc14c9f0d66d91b6","repo":"pentaho/pentaho-kettle","slug":"mappingdialog-exception-notconnectedtorepository-message-cc14c9","errorCode":"MappingDialog.Exception.NotConnectedToRepository.Message","errorMessage":"MappingDialog.Exception.NotConnectedToRepository.Message","messagePattern":"MappingDialog\\.Exception\\.NotConnectedToRepository\\.Message","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java","lineNumber":465,"sourceCode":"          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() );\n      String fullPath =\n        Const.NVL( path, \"\" ) + \"/\" + Const.NVL( transInf.getName(), \"\" );\n      wPath.setText( fullPath );\n    } catch ( KettleException e ) {\n      new ErrorDialog( shell, BaseMessages.getString(\n        PKG, \"MappingDialog.Exception.UnableToReferenceObjectId.Title\" ), BaseMessages.getString(\n        PKG, \"MappingDialog.Exception.UnableToReferenceObjectId.Message\" ), e );\n    }\n  }\n\n  /**\n   * Copy information from the meta-data input to the dialog fields.\n   */","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java#L447-L483","documentation":"Thrown by MappingDialog.getByReferenceData when it needs repository object information for a mapping referenced by ObjectId but no repository connection is available (repository == null). The dialog cannot resolve the object's path without a repository.","triggerScenarios":"The Mapping step is configured with 'specify by object ID' (reference data) while the transformation is running without an active repository connection; getData calls getByReferenceData.","commonSituations":"Opening a transformation that was designed against a repository but loaded from file, running in a standalone/local mode, or the repository connection was lost before the dialog loaded.","solutions":["Connect to the repository before opening the Mapping dialog","Change the mapping specification type to use filename/path instead of repository object ID","Ensure the transformation is checked out/edited within the repository context","Re-establish a lost repository connection in Spoon"],"exampleFix":"// before\n// transformation opened from file, mapping referenced by objectId\n// after\n// connect to repository first, or switch spec type:\nmappingSpec.setSpecificationMethod(MappingMeta.SPECIFICATION_FILENAME);","handlingStrategy":"try-catch","validationCode":"if (repository == null) { // defer by-reference resolution or prompt for repository login }","typeGuard":null,"tryCatchPattern":"try { getByReferenceData(objectId); } catch (KettleException e) { if (repository == null) promptRepositoryLogin(); }","preventionTips":["Always open repository-based transformations with an active repository connection","Avoid by-objectId specification for transformations shared outside the repository","Handle disconnected (file-based) runs with filename-based mapping specs"],"tags":["pentaho-kettle","swt-dialog","repository","connectivity"],"backgroundTag":"authentication-required","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"}