Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.5.2
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
When a JAR extension is uninstalled (or upgraded) on a wiki, all the JAR extensions of that wiki namespace are reloaded: their components are unregistered, the namespace classloader is recreated and the extensions are initialized again.
The problem is that, while initializing again the extensions of the wiki namespace, the dependencies of those extensions which are installed on the farm (root namespace) are initialized again too, even if they were never unloaded. Their components are registered a second time in the root component manager, which replaces the existing descriptors and disposes the singleton instances currently in use, while anything still holding them (other components, objects which are not components, etc.) keeps using disposed instances.
Steps to reproduce (for example):
- install an extension on the farm (for example org.xwiki.contrib.oidc:oidc-authenticator, which is forced to the root namespace)
- install on the main wiki an extension depending on it (for example org.xwiki.contrib.oidc:oauth2-client)
- install on the main wiki any other JAR extension (for example the Raw macro) and uninstall it
The components of the farm extension are registered again during the reload of the main wiki namespace. In the case of the OIDC authenticator, it leads to every request failing with "Cache 'oidc.client.configuration' is in 'TERMINATED' state" until restart (see OIDC-323).
Attachments
Issue Links
- is duplicated by
-
OIDC-323 Authentication failing after uninstalling a jar extension from a wiki
-
- Closed
-