{"record":{"id":"aa63cdcf6523b63a","repo":"pentaho/pentaho-kettle","slug":"error-0011-unable-to-get-roles","errorCode":"ERROR_0011_UNABLE_TO_GET_ROLES","errorMessage":"UserRoleDelegate.ERROR_0011_UNABLE_TO_GET_ROLES","messagePattern":"UserRoleDelegate\\.ERROR_0011_UNABLE_TO_GET_ROLES","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UserRoleDelegate.java","lineNumber":403,"sourceCode":"\n    try {\n      return UserRoleHelper.convertFromProxyPentahoRole( userRoleWebService, UserRoleHelper.getProxyPentahoRole(\n          userRoleWebService, name ), lookupCache, rsm );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,\n          \"UserRoleDelegate.ERROR_0010_UNABLE_TO_GET_ROLE\", name ), e ); //$NON-NLS-1$\n    }\n  }\n\n  public List<IRole> getRoles() throws KettleException {\n    try {\n      if ( hasNecessaryPermissions ) {\n        return UserRoleHelper.convertToListFromProxyPentahoRoles( userRoleSecurityInfo, rsm );\n      } else {\n        return UserRoleHelper.convertToListFromNonPentahoRoles( userRoleInfo, rsm );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,\n          \"UserRoleDelegate.ERROR_0011_UNABLE_TO_GET_ROLES\" ), e ); //$NON-NLS-1$\n    }\n  }\n\n  public List<IRole> getDefaultRoles() throws KettleException {\n    ensureHasPermissions();\n\n    try {\n      return UserRoleHelper.convertToListFromProxyPentahoDefaultRoles( userRoleSecurityInfo, rsm );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,\n          \"UserRoleDelegate.ERROR_0011_UNABLE_TO_GET_ROLES\" ), e ); //$NON-NLS-1$\n    }\n  }\n\n  public void updateRole( IRole role ) throws KettleException {\n    ensureHasPermissions();\n","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UserRoleDelegate.java#L385-L421","documentation":"Thrown by UserRoleDelegate.getRoles() when the full role list cannot be retrieved. Both the privileged path (convertToListFromProxyPentahoRoles via userRoleSecurityInfo) and the restricted fallback path (convertToListFromNonPentahoRoles via userRoleInfo) are inside the try, so any failure is wrapped in a KettleException with ERROR_0011_UNABLE_TO_GET_ROLES.","triggerScenarios":"Calling getRoles() when the permission probe or the web service/role lookup throws: server unreachable, expired session, conversion errors in UserRoleHelper, or security provider failures on the server.","commonSituations":"Role assignment dialogs in Spoon showing empty after session expiry; Pentaho server backed by a failing LDAP/AD provider; repository connection created against a server version with an incompatible user-role web service.","solutions":["Inspect the wrapped cause for the server error.","Re-login to the repository to refresh the session.","Check Pentaho server logs for security provider (LDAP) errors.","Verify server/client plugin version compatibility for the user-role web service."],"exampleFix":"// before\nList<IRole> roles = userRoleDelegate.getRoles();\n// after\nList<IRole> roles;\ntry {\n  roles = userRoleDelegate.getRoles();\n} catch (KettleException e) {\n  logger.error(\"Role list unavailable: \" + e.getCause(), e);\n  roles = Collections.emptyList();\n}","handlingStrategy":"try-catch","validationCode":"if (repository == null || !repository.isConnected()) {\n  throw new IllegalStateException(\"Repository not connected; getRoles() will fail\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  List<IRole> roles = userRoleDelegate.getRoles();\n} catch (KettleException e) {\n  log.error(\"Role list fetch failed: \" + e.getCause(), e);\n  // consider one re-login + retry\n}","preventionTips":["Check repository connection before listing roles.","Refresh sessions in long-running tools.","Monitor server-side security provider health.","Match pur plugin version to the Pentaho server version."],"tags":["pentaho","role-management","webservice"],"backgroundTag":"api-error-response","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"}