我试图通过TenantMgtAdminService删除租户,但这是不可能的。我尝试使用租户激活/非活动并使用superadmin和租户管理员凭据。我尝试删除数据库并重新创建它以确保数据不被破坏。我唯一做的就是创造这个租户。
我得到的错误如下:
[2017-02-13 15:15:27,525] ERROR {org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService} - Error deleting tenant with domain: testdomain.com and tenant id: 1.
is_1 | java.lang.Exception: Error in notifying tenant addition.
is_1 | at org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService.notifyTenantDeletion(TenantMgtAdminService.java:139)
is_1 | at org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService.deleteTenant(TenantMgtAdminService.java:568)
is_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
is_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
is_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
is_1 | at java.lang.reflect.Method.invoke(Method.java:498)
is_1 | at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
is_1 | at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
is_1 | at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
is_1 | at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
is_1 | at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
is_1 | at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
is_1 | at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
is_1 | at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
is_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
is_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
is_1 | at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
is_1 | at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
is_1 | at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
is_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
is_1 | at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
is_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
is_1 | at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
is_1 | at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
is_1 | at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
is_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
is_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
is_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
is_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
is_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
is_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
is_1 | at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:72)
is_1 | at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
is_1 | at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:60)
is_1 | at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
is_1 | at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
is_1 | at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
is_1 | at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
is_1 | at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
is_1 | at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
is_1 | at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
is_1 | at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
is_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
is_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
is_1 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
is_1 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
is_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
is_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
is_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
is_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
is_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
is_1 | at java.lang.Thread.run(Thread.java:745)
is_1 | Caused by: org.wso2.carbon.stratos.common.exception.StratosException: Error occurred while revoking the access tokens in tenant 1
is_1 | at org.wso2.carbon.identity.oauth2.internal.OAuthTenantMgtListenerImpl.onPreDelete(OAuthTenantMgtListenerImpl.java:76)
is_1 | at org.wso2.carbon.tenant.mgt.util.TenantMgtUtil.triggerPreTenantDelete(TenantMgtUtil.java:119)
is_1 | at org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService.notifyTenantDeletion(TenantMgtAdminService.java:135)
is_1 | ... 60 more
is_1 | Caused by: org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception: Error occurred while retrieving 'ACTIVE or EXPIRED' access tokens for user tenant id : 1
is_1 | at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.getAccessTokensOfTenant(TokenMgtDAO.java:1702)
is_1 | at org.wso2.carbon.identity.oauth2.internal.OAuthTenantMgtListenerImpl.onPreDelete(OAuthTenantMgtListenerImpl.java:42)
is_1 | ... 62 more
is_1 | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'USER_DOMAIN' in field list is ambiguous
is_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
is_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
is_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
is_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
is_1 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
is_1 | at com.mysql.jdbc.Util.getInstance(Util.java:408)
is_1 | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935)
is_1 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
is_1 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
is_1 | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
is_1 | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
is_1 | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
is_1 | at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
is_1 | at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
is_1 | at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.getAccessTokensOfTenant(TokenMgtDAO.java:1661)
is_1 | ... 63 more
非常感谢任何帮助。
答案 0 :(得分:0)
@Orfeas Panagou:如果您使用任何带有WSO2 IS的RDMS数据库进行用户管理,我不确定您的设置,那么您可以尝试从“[UM_TENANT]”表中删除所需的租户。
答案 1 :(得分:0)
根据@Pubci对我的问题的评论,使用RemoteTenantManagerService而不是TenantMgtAdminService。