Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-74741

Some plugins cannot be enabled after restart

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 8.20.0, 8.22.0, 9.0.0, 8.20.10
    • Data Center - Apps

    Description

      Issue Summary

      This is reproducible on Data Center: (yes)

      The issue is intermittent. Upon restart some plugins are not enabled. One cannot enable them from UPM.

      Cause:
      There is a 3rd party plugin installed, which was not created with Atlassian Plugin SDK and is using an old version of atlassian-plugin scanner. It can be checked by uziping plugin's jar and checking for plugin-context.xml existence. If there is no present and instead we have spring.handlers and spring.schemas configuration files, the plugin was not created with Atlassian Plugin SDK and therefore can cause Jira to not be able to enable other plugins that were created with Atlassian Plugin SDK and are using an old version of atlassian-plugin scanner.

      How it breaks other plugins startup:
      Defining spring.handlers is a job for atlassian-plugin-scanner. If some other plugin (A) do so, it overrides scanner for other plugins (B, C) with it's own. So upon initialisation of plugin B, it will try to use plugin's A scanner. Plugin A may not be importing all necessary bundles that plugin B requires, resulting in plugin B not being able to start.

      Why it is intermittent:
      It will happen, if plugin A was enabled before plugins B and C. As the order in which Jira enables the plugins is not set, this issue is only visible sometimes. 
      In the case of plugin A importing all the necessary bundles for B and C plugins, the issue will not appear.

      Steps to Reproduce

      1. Install plugin that was not created with Atlassian Plugin SDK, ex. Delegated Project Creator for Jira
      2. Install plugin that is using old scanner version, ex.  User Management for Jira
      3. Restart Jira.

      Expected Results

      Jira application starts without errors.

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      'com.wobo.jira.server.jira-plugin' - 'WorkBoard OKRs for Jira'  failed to load.
                  Unexpected exception parsing XML document from URL [bundle://212.0:0/META-INF/spring/plugin-context.xml]; nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/Element
                      org/w3c/dom/Element
                              org.w3c.dom.Element not found by com.wittified.jira.project-creator [211]
              'org.techtime.jira.plugins.usermanagement' - 'User Management for JIRA'  failed to load.             Unexpected exception parsing XML document from URL [bundle://227.0:0/META-INF/spring/plugin-context.xml]; nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/Element                 org/w3c/dom/Element  

      Workaround

      Once the instance eventually comes up (might require a few restart), disable the plugin with was not created with Atlassian Plugin SDK. Restart Jira.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              5b2ccddb8927 Anna Przybycień
              Votes:
              7 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated: