{"record":{"id":"b7a2d82e0bc96c73","repo":"pentaho/pentaho-kettle","slug":"permissionscontroller-error-0001-unable-to-initial","errorCode":"PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE","errorMessage":"Unable to initialize repository service: {0}","messagePattern":"Unable to initialize repository service: (.+?)","errorType":"error_code","errorClass":"ControllerInitializationException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/AbstractPermissionsController.java","lineNumber":94,"sourceCode":"  protected XulButton assignRoleButton;\n  protected XulButton unassignRoleButton;\n  protected XulButton applyAclButton;\n  protected Binding securityBinding;\n  protected UIRepositoryObjectAcls viewAclsModel;\n  protected UIRepositoryObjectAclModel manageAclsModel;\n  protected RepositorySecurityProvider service;\n\n  protected MainController mainController;\n\n  protected abstract List<? extends Object> getSelectedObjects();\n\n  protected PermissionsCheckboxHandler permissionsCheckboxHandler;\n\n  protected void init( Repository rep ) throws Exception {\n    if ( rep != null && rep.hasService( RepositorySecurityProvider.class ) ) {\n      service = (RepositorySecurityProvider) rep.getService( RepositorySecurityProvider.class );\n    } else {\n      throw new ControllerInitializationException( BaseMessages.getString( PKG,\n          \"PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE\", RepositorySecurityManager.class ) ); //$NON-NLS-1$\n    }\n    messageBox = (XulMessageBox) document.createElement( \"messagebox\" );//$NON-NLS-1$ \n    viewAclsModel = new UIRepositoryObjectAcls();\n    manageAclsModel = new UIRepositoryObjectAclModel( viewAclsModel );\n    bf = new DefaultBindingFactory();\n    bf.setDocument( this.getXulDomContainer().getDocumentRoot() );\n\n    mainController = (MainController) this.getXulDomContainer().getEventHandler( \"mainController\" );\n\n    confirmBox = (XulConfirmBox) document.createElement( \"confirmbox\" );//$NON-NLS-1$\n    confirmBox.setTitle( BaseMessages.getString( PKG, \"PermissionsController.RemoveAclWarning\" ) ); //$NON-NLS-1$\n    confirmBox.setMessage( BaseMessages.getString( PKG, \"PermissionsController.RemoveAclWarningText\" ) ); //$NON-NLS-1$\n    confirmBox.setAcceptLabel( BaseMessages.getString( PKG, \"Dialog.Ok\" ) ); //$NON-NLS-1$\n    confirmBox.setCancelLabel( BaseMessages.getString( PKG, \"Dialog.Cancel\" ) ); //$NON-NLS-1$\n    confirmBox.addDialogCallback( new XulDialogCallback<Object>() {\n      public void onClose( XulComponent sender, Status returnCode, Object retVal ) {\n        if ( returnCode == Status.ACCEPT ) {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/AbstractPermissionsController.java#L76-L112","documentation":"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.","triggerScenarios":"Calling init(rep) with a repository that does not implement hasService(RepositorySecurityProvider.class) == true, or with rep == null.","commonSituations":"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.","solutions":["Connect to a Pentaho EE repository that provides the security service before initializing the controller","Guard controller initialization: only call init when rep != null && rep.hasService(RepositorySecurityProvider.class)","Wrap init in try-catch for ControllerInitializationException and disable the security/permissions UI instead of failing","Verify the pur (Enterprise Repository) plugin is installed and the repository type is 'Pentaho Enterprise Repository'"],"exampleFix":"// before\ncontroller.init( rep );\n// after\nif ( rep != null && rep.hasService( RepositorySecurityProvider.class ) ) {\n  controller.init( rep );\n}","handlingStrategy":"try-catch","validationCode":"if (rep != null && rep.hasService(RepositorySecurityProvider.class)) { /* safe to init */ }\n","typeGuard":"static boolean hasSecurityService(Repository rep) {\n  return rep != null && rep.hasService(RepositorySecurityProvider.class);\n}\n","tryCatchPattern":"try {\n  controller.init(rep);\n} catch (ControllerInitializationException e) {\n  log.warn(\"Security service unavailable; permissions UI disabled\", e);\n  // disable permissions tab\n}\n","preventionTips":["Only wire security-dependent controllers when connected to a Pentaho EE repository","Check hasService(RepositorySecurityProvider.class) before init","Ensure the pur plugin is installed and repository connection is complete"],"tags":["pentaho","repository","security","controller-init"],"backgroundTag":"feature-not-enabled","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"}