Failed to enable service management plugin with an error : "Cannot start plugin: com.atlassian.servicedesk"
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
When working trying to enable service management plugin in Add-ons > Manage Add-ons, one of the following errors occurs :
- This add-on failed to enable. Refer to the logs for more information.
- The Jira server was contacted but has returned an error response. We are unsure of the result of this operation.
- The call to the Jira server did not complete within the timeout period. We are unsure of the result of this operation.
And the following Java exception appears in the atlassian-jira.log
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.atlassian.servicedesk at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:484) at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:310) at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:147) at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:115) ... Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.atlassian.servicedesk : Unable to resolve 134.0: missing requirement [134.0] package; (package=com.atlassian.pocketknife.api.commons.jira) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409) at org.apache.felix.framework.Felix.startBundle(Felix.java:1709) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892) at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:461)
- This problem was detected on Jira 6.4.7 with Service Management Add-ons 2.3.6, it may also be applied to other versions of Jira/Service Management.
From the error message
Unable to resolve 134.0: missing requirement [134.0] package; (package=com.atlassian.pocketknife.api.commons.jira)
we can see there is a missing dependency.
- After doing a search in All Add-ons with key word "pocketknife" on a running healthy service management instance, we found the plugin "Atlassian Pocketknife API Commons Plugin", which is not present on the defective instance.
The required plugin for Service Management is missing : "Atlassian Pocketknife API Commons Plugin"
This could be caused by a corrupted installation or the required plugin was accidentally deleted by user.
The required plugin is installed automatically with the Service Management plugin, so in order to fix this problem :
- Uninstall the Service Management plugin
- Reinstall the plugin by following any of the methods as described on the Installing Marketplace apps page