Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-99461

Enabling Certain Apps in Confluence fails with com.atlassian.user.impl OSGi error

XMLWordPrintable

      Problem

      A variety of apps fail to enable in Confluence 9.3.2. Analysis of the logs shows the following errors when these fail:

      2025-03-13 05:35:58,446 ERROR [UpmAsynchronousTaskManager:thread-3] [atlassian.plugin.manager.PluginEnabler] actualEnable Unable to enable plugin com.midori.confluence.plugin.archiving
       -- url: /confluence/rest/plugins/1.0/ | userName: admin | referer: https://linux-94980.prod.atl-cd.net/confluence/plugins/servlet/upm/marketplace/featured | traceId: 6e93914f1fef2f83
      com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.midori.confluence.plugin.archiving
      	at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:423)
      	at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:260)
      	at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)
      ...
      Caused by: org.osgi.framework.BundleException: Unable to resolve com.midori.confluence.plugin.confluence-archiving-plugin [290](R 290.0): missing requirement [com.midori.confluence.plugin.confluence-archiving-plugin [290](R 290.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.user.impl)(version>=3.0.0)(version<=3.0.0)) Unresolved requirements: [[com.midori.confluence.plugin.confluence-archiving-plugin [290](R 290.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.user.impl)(version>=3.0.0)(version<=3.0.0))]
      	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
      

      A non-exhaustive list of the affected apps is below:

      • Better Content Archiving
      • Mosaic
      • PlantUML for Confluence
      • Cache for Confluence

      Environment

      Confluence 9.3.2

      Steps to Reproduce

      1. Install Confluence 9.3.2
      2. Attempt to install one of the affected apps (Midori Better Content Archiving for example)

      Expected Results

      App is installed and enabled in the UI

      Actual Results

      App is installed, but fails to enable. Attempts to enable in the UI stall out with no observable activity. Analysis of the logs shows the aforementioned errors.

      Workaround

      As with all recommendations made by Atlassian Support, please follow best practices for Change Management and test and validate these settings in a Test or Development environment prior to deploying any changes to a Production environment. This allows for the validation of these changes while minimizing the risk and impact to end users.

      To manually remove the invalid osgi import packages from `MANIFEST.MF` from `transformed-plugins`:

      1. Shut down the server
      2. Goto Confluence home > plugin-osgi-cache > transformed-plugins, find the target transformed plugin, e.g: 
        // notice: that the full name is important and is different on different server after plugin installed, DO NOT change it
        1741915664103plugin_10170326145924478713_bobswift-cache-7.9.11_1741915664103.jar  
      1. Backup the target jar in case you want to rollback
      2. Unzip the original jar file 
      3. Got to unzipped directory > META-INF, open MANIFEST.MF in an txt editor
      4. In `Import-Package` section, find the invalid package, remove it and save the file, such as below or if from the logs there are more invalid osgi packages
        com.atlassian.user.impl;version="[3.0.0,3.0.0]" 
      1. Got to the root directory of the unzip directories (the parent directory of `META-INF` folder) 
      2. Create an new plugin jar with the updated MANIFEST.MF
        // notice: use the name of the transformed plugin from the customer's server, below is just an example
        jar cmf META-INF/MANIFEST.MF ../1741915664103plugin_10170326145924478713_bobswift-cache-7.9.11_1741915664103.jar *  
      1. Replace the original jar file with the new plugin jar file in `transformed-plugins` folder
      2. Restart the server and check the plugin status  

      Notice: this is not a guarantee that plugin will function well, it is just to fix the problem the invalid osgi package cause the plugin not able to enable. We advise testing in a lower environment before applying this to prod.

              854eef6f5746 Kusal Kithul-Godage
              danthony@atlassian.com Dante Anthony
              Votes:
              41 Vote for this issue
              Watchers:
              40 Start watching this issue

                Created:
                Updated:
                Resolved: