pentaho/pentaho-kettle · error · KettleException

SimpleMappingDialog.Exception.NotConnectedToRepository.Messa…

Error message

SimpleMappingDialog.Exception.NotConnectedToRepository.Message

What it means

getByReferenceData converts a transformation ObjectId reference into a displayable repository path. It requires an active repository connection; when this.repository is null it throws this KettleException (SimpleMappingDialog.Exception.NotConnectedToRepository.Message) instead of dereferencing the repository and failing obscurely.

Solutions

  1. Connect to the repository (Repository -> Connect) before opening the mapping dialog
  2. Re-specify the mapping by filename instead of by repository reference
  3. Log in with correct credentials if the session lost its repository connection
  4. Convert the mapping reference to a file path if the transformation is now maintained outside the repository

Example fix

// before: repository-less session loading repo reference by ObjectId
if ( repository == null ) { throw new KettleException( ...NotConnectedToRepository... ); }
// after (caller guard)
if ( repository != null ) { loadByReference( referenceObjectId ); } else { loadByFilename( mappingFilePath ); }
Defensive patterns

Strategy: validation

Validate before calling

// Java: require an active repository before resolving references by ObjectId
if ( repository == null ) throw new IllegalStateException( "Connect to a repository first" );

Type guard

boolean repoConnected = repository != null && repository.isConnected();

Try / catch

try { getByReferenceData( objectId ); } catch ( KettleException e ) { promptRepositoryLogin(); }

Prevention

When it happens

Trigger: Opening the Simple Mapping dialog or invoking getData for a mapping specified by reference (by ObjectId) while the transformation is not connected to a repository (e.g. running against local/file metadata).

Common situations: Opening a repository-based mapping transformation from a local (no-repo) session; repository login failed or was logged out; transformation migrated to a file-based setup but still holds repository references.

Related errors


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

Appendix: source

Thrown at ui/src/main/java/org/pentaho/di/ui/trans/steps/simplemapping/SimpleMappingDialog.java:427

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

  private void getByReferenceData( ObjectId transObjectId ) {
    try {
      if ( repository == null ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "SimpleMappingDialog.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, "SimpleMappingDialog.Exception.UnableToReferenceObjectId.Title" ), BaseMessages.getString(
        PKG, "SimpleMappingDialog.Exception.UnableToReferenceObjectId.Message" ), e );
    }
  }

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

View on GitHub (pinned to f3058517a1)