Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
12.10.8
-
None
-
Unknown
-
Description
Hibernate is initialized at startup and extension having database mapping are also injecting their mapping at startup. The problem is that if you upgrade the extension then the classes Hibernate knows are the one from the previous classloader.
Ideally, we would need to recreate the Hibernate classloader as soon as the classloader of any of the currently registered hibernate entities is closed. There does not seems to be any way to know that in standard ClassLoader but we could add a #isClosed() in NamespaceURLClassLoader.
The workaround is to restart XWiki.
Attachments
Issue Links
- depends on
-
XCOMMONS-2257 Expose an API to know if a NamespaceURLClassLoader has been closed
- Closed
- is related to
-
XWIKI-19932 Injecting custom table in the hibernate mapping from an installed extension is too complex
- Open