{"record":{"id":"315ac58daceebe01","repo":"pentaho/pentaho-kettle","slug":"abssecuritymanager-error-0003-unable-to-access-role-binding","errorCode":"AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC","errorMessage":"AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC","messagePattern":"AbsSecurityManager\\.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/AbsSecurityManager.java","lineNumber":160,"sourceCode":"    }\n    return roles;\n  }\n\n  @Override\n  public IRole constructRole() throws KettleException {\n    return new AbsRoleInfo();\n  }\n\n  public List<String> getLocalizedLogicalRoles( String runtimeRole, String locale ) throws KettleException {\n    if ( authorizationPolicyRoleBindingService != null ) {\n      List<String> localizedLogicalRoles = new ArrayList<String>();\n      if ( roleBindingStruct != null && roleBindingStruct.logicalRoleNameMap != null ) {\n        List<String> logicalRoles = getLogicalRoles( runtimeRole );\n        for ( String logicalRole : logicalRoles ) {\n          localizedLogicalRoles.add( roleBindingStruct.logicalRoleNameMap.get( logicalRole ) );\n        }\n      } else {\n        throw new KettleException( BaseMessages.getString( AbsSecurityManager.class,\n            \"AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC\" ) ); //$NON-NLS-1$\n      }\n      return localizedLogicalRoles;\n    } else {\n      throw new KettleException( BaseMessages.getString( AbsSecurityManager.class,\n          \"AbsSecurityManager.ERROR_0005_INSUFFICIENT_PRIVELEGES\" ) ); //$NON-NLS-1$\n    }\n  }\n\n  public List<String> getLogicalRoles( String runtimeRole ) throws KettleException {\n    if ( authorizationPolicyRoleBindingService != null ) {\n      if ( roleBindingStruct != null && roleBindingStruct.bindingMap != null\n          && roleBindingStruct.bindingMap.containsKey( runtimeRole ) ) {\n        return roleBindingStruct.bindingMap.get( runtimeRole );\n      }\n      return null;\n    } else {\n      throw new KettleException( BaseMessages.getString( AbsSecurityManager.class,","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/AbsSecurityManager.java#L142-L178","documentation":"getLocalizedLogicalRoles(runtimeRole, locale) throws ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC when the cached roleBindingStruct is null or its logicalRoleNameMap is null — i.e. initialize(locale) was never called successfully or the role-binding web service returned no mapping data, so logical role names cannot be translated to localized display names.","triggerScenarios":"Calling getLocalizedLogicalRoles before (or after a failed) initialize(locale); the role-binding web service returned an empty/null RoleBindingStruct; the logicalRoleNameMap field is null in the returned struct.","commonSituations":"Calling security-manager APIs out of order (getLocalizedLogicalRoles without initialize); initialize failed earlier with ERROR_0002/ERROR_0005 leaving roleBindingStruct null; server returned a struct without the localization map due to version or permission differences.","solutions":["Ensure initialize(locale) is called and completes successfully before invoking getLocalizedLogicalRoles.","Check whether an earlier initialize threw ERROR_0002_UNABLE_TO_GET_LOGICAL_ROLES and resolve that underlying web service failure first.","Verify the connected user can read the role binding structure (the map may be withheld for insufficient privileges).","Call initialize again to refresh the cached roleBindingStruct after fixing connectivity/permission issues.","Confirm server/client compatibility so RoleBindingStruct.logicalRoleNameMap is populated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// call initialize(locale) first and confirm success before calling getLocalizedLogicalRoles\nsecurityManager.initialize(locale); // throws if the struct cannot be fetched","typeGuard":null,"tryCatchPattern":"try { List<String> localized = securityManager.getLocalizedLogicalRoles(runtimeRole, locale); } catch (KettleException e) { if (e.getMessage().contains(\"ERROR_0003\")) { securityManager.initialize(locale); /* retry once after refresh */ } else { throw e; } }","preventionTips":["Always call initialize(locale) immediately after obtaining the security manager","Treat an ERROR_0002/0005 from initialize as a signal to fix connectivity before other calls","Refresh roleBindingStruct (re-run initialize) after reconnecting to the server","Verify the user can read the role binding structure"],"tags":["pentaho","kettle","web-service","initialization-order"],"backgroundTag":"internal-invariant-violation","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"}