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
Error:
TID: [80] [] [2018-11-15 13:11:42,205] @testTenant.com [80] [IS]ERROR {org.wso2.carbon.ndatasource.core.DataSourceAxis2ConfigurationContextObserver} - Error in initializing data sources for tenant: 80 - Error in getting all data sources from repository: Illegal access attempt to cache ] owned by tenant {[testTenant.com],[79]} by tenant {[testTenant.com],[80]}
Description:
When we delete a tenant(with existing methods) we didn't the caches and the entry in globalCacheManagerMap. So when ever we try to create a new tenant with same domain name it checks with map and instead of creating new cache managers it returns existing entry value which owns by previous tenant. This is the reason for the error.
CacheManagerFactoryImpl class we have method named "close()" to shut down all the caches for a tenant, but in that method we didn't remove the entry for that particular domain from the globalCacheManagerMap.
If the entry exists after shutdown all the caches, it throws security exception when we try to create new Tenant.
The text was updated successfully, but these errors were encountered:
Thumimku
changed the title
Remove entry from globalCacheManagerMap while shutdown CacheManagers
Security exception occurred when try to create a tenant with deleted tenant's domain name
Dec 3, 2018
Use JDBC Tenant Manager's deleteTenant method to clear the caches
This class has method to delete a tenant. But it doesn't delete all the caches for that particular tenant. We need to improve that method to delete all caches.
We can call above close method to delete the caches.
Error:
TID: [80] [] [2018-11-15 13:11:42,205] @testTenant.com [80] [IS]ERROR {org.wso2.carbon.ndatasource.core.DataSourceAxis2ConfigurationContextObserver} - Error in initializing data sources for tenant: 80 - Error in getting all data sources from repository: Illegal access attempt to cache ] owned by tenant {[testTenant.com],[79]} by tenant {[testTenant.com],[80]}
Description:
When we delete a tenant(with existing methods) we didn't the caches and the entry in globalCacheManagerMap. So when ever we try to create a new tenant with same domain name it checks with map and instead of creating new cache managers it returns existing entry value which owns by previous tenant. This is the reason for the error.
CacheManagerFactoryImpl class we have method named "close()" to shut down all the caches for a tenant, but in that method we didn't remove the entry for that particular domain from the globalCacheManagerMap.
If the entry exists after shutdown all the caches, it throws security exception when we try to create new Tenant.
Related Issues:
Since this error encountered while improving tenant deletion.
Improve Tenant Deletion via Tenant deletion Admin Service.
The text was updated successfully, but these errors were encountered: