You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NPE on changing role audience of a shared app from organization audience to application audience
Screen.Recording.2025-01-24.at.00.19.33.mov
Steps to Reproduce
Create an application.
Change its role audience as "Organization"
Create some org audienced roles
Share the app with all sub orgs
Create a sub org
Check on the shared app and shared roles in the sub org
Go back to root app and change the role audience.
Check on the terminal, you can see NPE
[2025-01-24 00:20:31,107] [a535052e-1d04-490d-9fbb-14eb3d6dca69] ERROR {org.wso2.carbon.identity.organization.management.handler.listener.SharedRoleMgtListener} - Exception occurred during deleting roles from organization 3d75bd8a-e85c-4ad6-bfcb-53b184e9256e java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1739)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.getUserListOfRole(RoleDAOImpl.java:2870)
at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.getRole(RoleDAOImpl.java:506)
at org.wso2.carbon.identity.role.v2.mgt.core.RoleManagementServiceImpl.getRole(RoleManagementServiceImpl.java:292)
at org.wso2.carbon.identity.application.mgt.listener.DefaultRoleManagementListener.postGetAssociatedApplicationIdsByRoleId(DefaultRoleManagementListener.java:498)
at org.wso2.carbon.identity.role.v2.mgt.core.RoleManagementServiceImpl.getAssociatedApplicationByRoleId(RoleManagementServiceImpl.java:950)
at org.wso2.carbon.identity.organization.management.handler.listener.SharedRoleMgtListener.handleOrganizationAudiencedSharedRoleDeletion(SharedRoleMgtListener.java:540)
at org.wso2.carbon.identity.organization.management.handler.listener.SharedRoleMgtListener.lambda$handleRemovedOrganizationAudienceRolesOnAppUpdate$5(SharedRoleMgtListener.java:329)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
... 3 more
When you check the sub org, the shared org roles have not been deleted as well(Since there is no any other app which consume org roles those should be deleted)
Version
IS-7.1.0-m8-SNAPSHOT
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered:
Description
NPE on changing role audience of a shared app from organization audience to application audience
Screen.Recording.2025-01-24.at.00.19.33.mov
Steps to Reproduce
Version
IS-7.1.0-m8-SNAPSHOT
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: