ClassNotFoundException when upgrading an extension that changes the displayer type of a page wiki macro to a new type
Component:
Extension - XAR
2 comments
Thomas Mortagne on 19/Nov/26 14:26
I think what happens is that the wiki macro page is saved (and the macro registered), before the classloader is reloaded (which is done at the end of the extension job).
Not an easy fix. A common idea is to grab all the events produced during an extension job and release them at the end. But, aside from being potentially expensive in terms of memory, it also does not make much sense for various events (like *ing events which would not be able to modify the document about to be saved).
So that means delaying only some specific events. Fortunately document event don't implement Begin/EndEvent so it should technically be doable (delaying EndEvent would cause a huge mess to the ObservationContext).
Thomas Mortagne on 19/Nov/26 14:26
I think what happens is that the wiki macro page is saved (and the macro registered), before the classloader is reloaded (which is done at the end of the extension job).
Not an easy fix. A common idea is to grab all the events produced during an extension job and release them at the end. But, aside from being potentially expensive in terms of memory, it also does not make much sense for various events (like *ing events which would not be able to modify the document about to be saved).
So that means delaying only some specific events. Fortunately document event events don't implement Begin/EndEvent so it should technically be doable (delaying EndEvent would cause a huge mess to the ObservationContext).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.