wso2 / product-micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
https://wso2.com/integration/
Apache License 2.0
204 stars 221 forks source link

[MI-4.0.0] NullPointerException when trying to Delete a Hybrid Role for the user #3651

Closed imedyaosandi closed 1 month ago

imedyaosandi commented 1 month ago

Description

When trying to delete an assigned Hybrid Role for a user we can observe the below NullPointerException. However, the role deletion is getting successful.

Exception occurred when running org.wso2.carbon.inbound.endpoint.protocol.http.InboundHttpServerWorker java.lang.NullPointerException
    at org.wso2.micro.integrator.security.user.core.hybrid.JdbcHybridRoleManager.updateHybridRoleListOfUser(JdbcHybridRoleManager.java:653)
    at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.updateRoleListOfUserInternal(AbstractUserStoreManager.java:3396)
    at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.access$300(AbstractUserStoreManager.java:94)
    at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager$6.run(AbstractUserStoreManager.java:3239)
    at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager$6.run(AbstractUserStoreManager.java:3236)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.updateRoleListOfUser(AbstractUserStoreManager.java:3236)
    at org.wso2.micro.integrator.management.apis.RolesResource.handlePut(RolesResource.java:204)
    at org.wso2.micro.integrator.management.apis.RolesResource.invoke(RolesResource.java:99)
    at org.wso2.micro.integrator.management.apis.ApiResourceAdapter.invoke(ApiResourceAdapter.java:55)
    at org.wso2.carbon.inbound.endpoint.internal.http.api.InternalAPIDispatcher.dispatch(InternalAPIDispatcher.java:87)
    at org.wso2.carbon.inbound.endpoint.protocol.http.InboundHttpServerWorker.run(InboundHttpServerWorker.java:114)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Steps to Reproduce

No response

Affected Version(s)

MI-4.0.0

OS, DB, other environment details and versions

No response

Related issue(s) (optional)

No response

Suggested label(s) (optional)

Bug

Suggested assignee(s) (optional)

No response