I installed a plugin which registered an eventListener but after uninstalling it the listener was still working and executing code. I tried reinstalling the plugin adding unregisterAll() before the registering (according to another answer on this site) but just made things worse, the plugin wont finish the install.
So, is there a way to unregister the eventListener manually? Will restarting Confluence do the trick?
Thanks!
Community moderators have prevented the ability to post new answers.
If you've uninstalled the plugin without un-registering the event handler, you need to restart Confluence to clear the old event handler out. Calling unregisterAll
from within a newly-installed version of the plugin won't work because Confluence treats it as a different plugin (it has no event handles to unregister).
The correct behaviour is to call unregister when the plugin is un-installed or disabled. You can do this by making your event listener component implement the DisposableBean
interface and calling the unregister method within the destroy method. Here's an example: https://developer.atlassian.com/confdev/confluence-plugin-guide/confluence-plugin-module-types/event-listener-module/annotation-based-event-listener-example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
Restarting confluence did not unregister the listener and the above approach did not fix the problem in my case. Also plugin developer cannot ask customers to restart Confluence before updating the new version of plugin.
Apart from restarting confluence what other solutions are there. If the event listener was not deregistered in the old version of plugin how can I deregister event listener in the new version of plugin.
I see the old code is still executing even after complete uninstall of the plugin.
Thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am also facing the same issue, did any one have solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.