pentaho/pentaho-kettle · error · ControllerInitializationException

PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE

PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE

Error message

Unable to initialize repository service: {0}

What it means

AbstractPermissionsController.init requires the connected repository to expose a RepositorySecurityProvider service. If the repository is null or lacks that service, init throws ControllerInitializationException with PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE.

Solutions

  1. Connect to a Pentaho EE repository that provides the security service before initializing the controller
  2. Guard controller initialization: only call init when rep != null && rep.hasService(RepositorySecurityProvider.class)
  3. Wrap init in try-catch for ControllerInitializationException and disable the security/permissions UI instead of failing
  4. Verify the pur (Enterprise Repository) plugin is installed and the repository type is 'Pentaho Enterprise Repository'

Example fix

// before
controller.init( rep );
// after
if ( rep != null && rep.hasService( RepositorySecurityProvider.class ) ) {
  controller.init( rep );
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (rep != null && rep.hasService(RepositorySecurityProvider.class)) { /* safe to init */ }

Type guard

static boolean hasSecurityService(Repository rep) {
  return rep != null && rep.hasService(RepositorySecurityProvider.class);
}

Try / catch

try {
  controller.init(rep);
} catch (ControllerInitializationException e) {
  log.warn("Security service unavailable; permissions UI disabled", e);
  // disable permissions tab
}

Prevention

When it happens

Trigger: Calling init(rep) with a repository that does not implement hasService(RepositorySecurityProvider.class) == true, or with rep == null.

Common situations: Connecting to a non-security repository (e.g. plain database repository, File/Google Drive repositories) while using EE security-dependent UI controllers; repository not fully logged in/connected before controller init; PDI plugin expects Pentaho EE repository but user selected another type.

Related errors


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

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/AbstractPermissionsController.java:94

  protected XulButton assignRoleButton;
  protected XulButton unassignRoleButton;
  protected XulButton applyAclButton;
  protected Binding securityBinding;
  protected UIRepositoryObjectAcls viewAclsModel;
  protected UIRepositoryObjectAclModel manageAclsModel;
  protected RepositorySecurityProvider service;

  protected MainController mainController;

  protected abstract List<? extends Object> getSelectedObjects();

  protected PermissionsCheckboxHandler permissionsCheckboxHandler;

  protected void init( Repository rep ) throws Exception {
    if ( rep != null && rep.hasService( RepositorySecurityProvider.class ) ) {
      service = (RepositorySecurityProvider) rep.getService( RepositorySecurityProvider.class );
    } else {
      throw new ControllerInitializationException( BaseMessages.getString( PKG,
          "PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE", RepositorySecurityManager.class ) ); //$NON-NLS-1$
    }
    messageBox = (XulMessageBox) document.createElement( "messagebox" );//$NON-NLS-1$ 
    viewAclsModel = new UIRepositoryObjectAcls();
    manageAclsModel = new UIRepositoryObjectAclModel( viewAclsModel );
    bf = new DefaultBindingFactory();
    bf.setDocument( this.getXulDomContainer().getDocumentRoot() );

    mainController = (MainController) this.getXulDomContainer().getEventHandler( "mainController" );

    confirmBox = (XulConfirmBox) document.createElement( "confirmbox" );//$NON-NLS-1$
    confirmBox.setTitle( BaseMessages.getString( PKG, "PermissionsController.RemoveAclWarning" ) ); //$NON-NLS-1$
    confirmBox.setMessage( BaseMessages.getString( PKG, "PermissionsController.RemoveAclWarningText" ) ); //$NON-NLS-1$
    confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) ); //$NON-NLS-1$
    confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) ); //$NON-NLS-1$
    confirmBox.addDialogCallback( new XulDialogCallback<Object>() {
      public void onClose( XulComponent sender, Status returnCode, Object retVal ) {
        if ( returnCode == Status.ACCEPT ) {

View on GitHub (pinned to f3058517a1)