pentaho/pentaho-kettle · error · KettleException

GetRepositoryNames.Exception.NotConnectedToRepository

Error message

GetRepositoryNames.Exception.NotConnectedToRepository

What it means

GetRepositoryNamesDialog.displaydirectoryList throws a KettleException with the localized message 'GetRepositoryNames.Exception.NotConnectedToRepository' when the Browse (directory list) button is clicked while no repository is connected. The SelectDirectoryDialog requires a live Repository object; null means the dialog cannot browse directories.

Solutions

  1. Log in to a repository in Spoon (File > Open from repository or the repository login dialog) before browsing directories.
  2. Manually type the repository directory path instead of using the Browse button.
  3. Reconnect the repository session if it expired, then reopen the step dialog.

Example fix

// before: opening the step dialog with no repository session
TransMeta tm = new TransMeta( "local-file.ktr" ); // repository == null

// after: connect first
Repository rep = KettleRepositoryRegistry.connect( "myRepo", user, pass );
// then open the transformation/dialog from that repository
Defensive patterns

Strategy: validation

Validate before calling

if ( repository == null || !repository.isConnected() ) {
  // prompt the user to log in to a repository before opening the dialog
  MessageBox mb = new MessageBox( shell, SWT.ICON_WARNING );
  mb.setMessage( "Connect to a repository first." );
  mb.open();
  return;
}

Type guard

boolean repositoryAvailable( Repository r ) {
  return r != null && r.isConnected();
}

Prevention

When it happens

Trigger: Clicking the directory Browse button in the Get Repository Names step dialog when the transformation was opened from a file (e.g. a local .ktr) so the repository reference is null.

Common situations: User designs a transformation locally from a .ktr file and tries to browse repository directories; Spoon was started without logging into a repository; repository session expired but the dialog still holds a null/stale repository.

Related errors


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

Appendix: source

Thrown at plugins/get-repository-names/ui/src/main/java/org/pentaho/di/ui/trans/steps/getrepositorynames/GetRepositoryNamesDialog.java:622

          etd.setReadOnly();
          etd.open();
        }

        PreviewRowsDialog prd =
          new PreviewRowsDialog(
            shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
              .getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
        prd.open();
      }
    }
  }

  private void displaydirectoryList() {

    try {

      if ( repository == null ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "GetRepositoryNames.Exception.NotConnectedToRepository" ) );
      }

      SelectDirectoryDialog sdd = new SelectDirectoryDialog( shell, SWT.NONE, repository );
      RepositoryDirectoryInterface rd = sdd.open();
      if ( rd != null ) {
        wDirectory.setText( rd.getPath() );
      }

    } catch ( Exception e ) {
      new ErrorDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages.getString(
        PKG, "GetRepositoryNames.ErrorGettingFolderds.DialogMessage" ), e );
    }
  }
}

View on GitHub (pinned to f3058517a1)