pentaho/pentaho-kettle · error · KettleException

MappingDialog.Exception.NotConnectedToRepository.Message

MappingDialog.Exception.NotConnectedToRepository.Message

Error message

MappingDialog.Exception.NotConnectedToRepository.Message

What it means

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.

Solutions

  1. Connect to the repository before opening the Mapping dialog
  2. Change the mapping specification type to use filename/path instead of repository object ID
  3. Ensure the transformation is checked out/edited within the repository context
  4. Re-establish a lost repository connection in Spoon

Example fix

// before
// transformation opened from file, mapping referenced by objectId
// after
// connect to repository first, or switch spec type:
mappingSpec.setSpecificationMethod(MappingMeta.SPECIFICATION_FILENAME);
Defensive patterns

Strategy: try-catch

Validate before calling

if (repository == null) { // defer by-reference resolution or prompt for repository login }

Try / catch

try { getByReferenceData(objectId); } catch (KettleException e) { if (repository == null) promptRepositoryLogin(); }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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

Appendix: source

Thrown at ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java:465

          throw new KettleException(
            BaseMessages.getString( PKG, "MappingDialog.Exception.NoValidMappingDetailsFound" ) );
        }
        RepositoryDirectoryInterface repdir = repository.findDirectory( realDirectory );
        if ( repdir == null ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "MappingDialog.Exception.UnableToFindRepositoryDirectory" ) );
        }
        loadRepositoryTrans( realTransname, repdir );
        break;
      default:
        break;
    }
  }

  private void getByReferenceData( ObjectId transObjectId ) {
    try {
      if ( repository == null ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "MappingDialog.Exception.NotConnectedToRepository.Message" ) );
      }
      RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
      String path = DialogUtils
        .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
      String fullPath =
        Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
      wPath.setText( fullPath );
    } catch ( KettleException e ) {
      new ErrorDialog( shell, BaseMessages.getString(
        PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Title" ), BaseMessages.getString(
        PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Message" ), e );
    }
  }

  /**
   * Copy information from the meta-data input to the dialog fields.
   */

View on GitHub (pinned to f3058517a1)