Details
-
Bug
-
Resolution: Fixed
-
High
-
4.3
-
4.03
-
Description
This was discovered by having JIM-RC1 in bundled-plugins.zip and then installing JIM-final (via UPM or whatever). When you restart JIRA you get a message that looks like
Ignoring the Spring context that was just created for plugin X. The plugin is in an invalid state, DISABLED, that doesn't support a transition to enabled. Most likely, it was disabled due to a timeout.
The problem here is that we have a bundled-plugin that is marked a RequiresRestart. During OsgiPlugin.disableInternal we have
// Only disable underlying bundle if this is a truly dynamic plugin if (!PluginUtils.doesPluginRequireRestart(this)) { if (getPluginState() == PluginState.ENABLING) { logAndClearOustandingDependencies(); } helper.onDisable(); pluginEventManager.unregister(this); getBundle().stop(); treatSpringBeanFactoryCreationAsRefresh = false; }
So this code isn't going to run. What we need to do is do most of this but not all. For instance, we want to leave the bundle running. So maybe something like:
else { if (getPluginState() == PluginState.ENABLING) { logAndClearOustandingDependencies(); } helper.onDisable(); pluginEventManager.unregister(this); //getBundle().stop(); treatSpringBeanFactoryCreationAsRefresh = false; }
However, we'll require manual testing in JIRA for things like workflow plugins to make sure that doesn't result in lots of exceptions all over the place.