JSU fails to start with "IllegalStateException: The bundle is uninstalled" after a Jira upgrade or migration

JSU fails to start with "IllegalStateException: The bundle is uninstalled" after a Jira upgrade or migration

This knowledge base article provides troubleshooting steps for a common OSGi container error that prevents the JSU Automation Suite for Jira Workflows app from starting after an upgrade or migration of a Jira Data Center instance.

Summary

After migrating to a Jira Data Center instance or upgrading, the JSU Automation Suite for Jira Workflows app may fail to enable. While the UI might show the app as installed, the logs indicate an OSGi container error. This is typically caused by a corrupted OSGi cache or stale references from a previous installation.

Use Case

A Jira administrator migrates or upgrades a Data Center instance (e.g., from version 9.x to 10.x or 11.x) and finds that JSU is installed but cannot be enabled.

Symptoms

  • The "Manage Apps" admininsttation page shows JSU as installed, but it cannot be enabled.

  • The following error (or similar) appears in the Jira logs (atlassian-jira.log):

ERROR [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.googlecode.jira-suite-utilities' org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://.../META-INF/spring/plugin-context.xml] ... Caused by: java.lang.IllegalStateException: The bundle is uninstalled.

Cause

This issue is usually caused by:

  1. Corrupted OSGi cache: Following a migration, the OSGi cache may contain stale or conflicting references to the JSU bundle.

  2. Incomplete Uninstall/Upgrade: Stale references in the file system or database from a previous JSU version (3.x or older 4.x), preventing the new version from initializing.

Resolution

Path 1: Manual Reinstall with Instance Restart

This is the recommended first step to ensure the app is in a clean state.

  1. Navigate to Administration > Manage apps.

  2. Locate JSU Automation Suite for Jira Workflows and select Uninstall.

  3. Shut down the Jira instance (or all nodes if in a cluster).

  4. Restart the Jira instance.

  5. Download the latest compatible version directly from the Marketplace page: JSU Automation Suite for Jira Workflows - Version history | Atlassian Marketplace | Atlassian Marketplace.

  6. Upload the .jar file via Manage apps > Upload app (you might need to re-enable the plugin upload feature. See this page for more information: https://confluence.atlassian.com/jirakb/how-to-re-enable-plugin-upload-in-jira-data-center-1364557898.html.

Path 2: Clearing the OSGi Cache

If the manual reinstall does not work, clearing the OSGi cache will force Jira to rebuild the plugin containers.

  1. Stop Jira (on all nodes).

  2. Navigate to your $JIRA_HOME directory.

  3. Locate and delete the contents of the following directories:

    • $JIRA_HOME/plugins/.osgi-plugins

    • $JIRA_HOME/plugins/.bundled-plugins
      (Note: These directories will be recreated automatically on startup.)

  4. Start Jira.

  5. Attempt to enable JSU via the Manage apps interface.

Path 3: Verify Plugin Integrity

If the error persists, check for file-level conflicts.

  1. Check the $JIRA_HOME/plugins/installed-plugins directory.

  2. Ensure there is only one JSU jar file (e.g., jira-suite-utilities-4.1.1.jar). If multiple versions exist, remove the older ones while Jira is stopped.