Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to assign admin role to a user while creating the user #17286

Closed
AnuradhaSK opened this issue Oct 27, 2023 · 1 comment
Closed

Unable to assign admin role to a user while creating the user #17286

AnuradhaSK opened this issue Oct 27, 2023 · 1 comment

Comments

@AnuradhaSK
Copy link
Contributor

Describe the issue:

Screen.Recording.2023-10-27.at.11.32.19.mov
[2023-10-27 11:32:40,462] [66165a10-12e7-4963-9488-0a78f24132a4] ERROR {org.wso2.charon3.core.protocol.endpoints.AbstractResourceManager} - Error occurred while updating users in the role with ID: 69d439aa-709f-40ec-a566-84456a8b08d4 org.wso2.charon3.core.exceptions.CharonException: Error occurred while updating users in the role with ID: 69d439aa-709f-40ec-a566-84456a8b08d4
	at org.wso2.carbon.identity.scim2.common.impl.SCIMRoleManagerV2.doUpdateUsers(SCIMRoleManagerV2.java:995)
	at org.wso2.carbon.identity.scim2.common.impl.SCIMRoleManagerV2.updateUsers(SCIMRoleManagerV2.java:924)
	at org.wso2.carbon.identity.scim2.common.impl.SCIMRoleManagerV2.patchRole(SCIMRoleManagerV2.java:384)
	at org.wso2.charon3.core.protocol.endpoints.RoleResourceV2Manager.updateWithPatchOperations(RoleResourceV2Manager.java:542)
	at org.wso2.charon3.core.protocol.endpoints.RoleResourceV2Manager.updateWithPATCHRole(RoleResourceV2Manager.java:289)
	at org.wso2.carbon.identity.scim2.provider.resources.RoleResourceV2.patchRole(RoleResourceV2.java:261)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:281)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.wso2.carbon.tomcat.ext.filter.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:129)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:596)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:118)
	at org.wso2.carbon.identity.context.rewrite.valve.OrganizationContextRewriteValve.invoke(OrganizationContextRewriteValve.java:115)
	at org.wso2.carbon.tomcat.ext.valves.SameSiteCookieValve.invoke(SameSiteCookieValve.java:38)
	at org.wso2.carbon.identity.cors.valve.CORSValve.invoke(CORSValve.java:83)
	at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:175)
	at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:144)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:110)
	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:71)
	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:152)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:670)
	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:63)
	at org.wso2.carbon.tomcat.ext.valves.RequestEncodingValve.invoke(RequestEncodingValve.java:49)
	at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:137)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.wso2.carbon.identity.role.v2.mgt.core.exception.IdentityRoleManagementServerException: Error while updating users to the role: admin in the tenantDomain: carbon.super
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.updateUserListOfRole(RoleDAOImpl.java:2717)
	at org.wso2.carbon.identity.role.v2.mgt.core.RoleManagementServiceImpl.updateUserListOfRole(RoleManagementServiceImpl.java:300)
	at org.wso2.carbon.identity.scim2.common.impl.SCIMRoleManagerV2.doUpdateUsers(SCIMRoleManagerV2.java:986)
	... 65 more
Caused by: org.h2.jdbc.JdbcBatchUpdateException: NULL not allowed for column "UM_ROLE_ID"; SQL statement:
INSERT INTO UM_HYBRID_USER_ROLE (UM_USER_NAME, UM_ROLE_ID, UM_TENANT_ID, UM_DOMAIN_ID) VALUES ( ? ,(SELECT UM_ID FROM UM_HYBRID_ROLE WHERE UM_ROLE_NAME= ?  AND UM_AUDIENCE_REF_ID= ?  AND UM_TENANT_ID= ? ),  ? , (SELECT UM_DOMAIN_ID FROM UM_DOMAIN WHERE UM_TENANT_ID= ?  AND UM_DOMAIN_NAME= ? )) [23502-220]
	at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1269)
	at jdk.internal.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:118)
	at com.sun.proxy.$Proxy55.executeBatch(Unknown Source)
	at org.wso2.carbon.database.utils.jdbc.NamedPreparedStatement.executeBatch(NamedPreparedStatement.java:732)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.processBatchUpdateForUsers(RoleDAOImpl.java:1871)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.updateUserListOfRole(RoleDAOImpl.java:2705)
	... 67 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants