NOTE: This bug report is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding bug report.

      Summary

      Enabling and installing Service Desk in a certain way is causing it to fail. We believe it is something to do with:

      1. Installing via the UPM and it semi fails - the plugin is disabled.
      2. The license is entered, and the UPM accepts it.
      3. The plugin is enabled and a different error message is generated.

      Steps to Reproduce

      Install Service Desk in the specific order that makes it not work, which is still to be discovered.

      Expected Results

      Service Desk enables successfully.

      Actual Results

      The following stack trace is thrown:

      2013-10-02 19:21:16,226 ThreadPoolAsyncTaskExecutor::Thread 28 ERROR tcarter 1343x33956x1 n05ov1 99.110.160.171 /rest/plugins/1.0/available/popular [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.servicedesk, config=osgibundle:/META-INF/spring/*.xml))
      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://142.0:0/META-INF/spring/spring.xml]; nested exception is java.lang.IllegalStateException: Invalid BundleContext.
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
      	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)
      	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)
      	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
      	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
      	...
      Caused by: java.lang.IllegalStateException: Invalid BundleContext.
      	at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:365)
      	at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:256)
      	at org.springframework.osgi.io.internal.resolver.PackageAdminResolver$1.run(PackageAdminResolver.java:178)
      	at java.security.AccessController.doPrivileged(Native Method)
      

      Workaround

      Increase the plugin start timeout from default 60 seconds to 300 seconds by specifying the startup parameter -Datlassian.plugins.enable.wait=300. For a better description please see Resolution #4 on following page: https://confluence.atlassian.com/display/JIRAKB/JIRA+System+Plugin+Timeout+While+Waiting+for+Plugins+to+Enable

      Restarting JIRA without specifying this parameter has been known to workaround the problem. Please note though that if you don't specify the increased timeout you will likely run into the same problem when you try updating the plugin to a newer version in UPM.

            [JSDSERVER-2] Service Desk fails to enable due to Invalid BundleContext

            Owen made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2305138 ] New: JAC Bug Workflow v3 [ 3126012 ]
            Status Original: Done [ 10044 ] New: Closed [ 6 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            David Di Blasio made changes -
            Component/s New: Installation, Upgrade, Startup, Shutdown [ 44394 ]
            Regular Expression Original: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL
            Symptom Severity New: Minor [ 14432 ]
            Affects Version/s New: 1.0 [ 37211 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 2059067 ] New: JSD Bug Workflow v5 - TEMP [ 2305138 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2056462 ] New: JSD Bug Workflow v5 [ 2059067 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 1956019 ] New: JSD Bug Workflow v5 - TEMP [ 2056462 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v4 [ 1615550 ] New: JSD Bug Workflow v5 [ 1956019 ]
            jonah (Inactive) made changes -
            Description Original: h3. Summary

            Enabling and installing Service Desk in a certain way is causing it to fail. We believe it is something to do with:

            # Installing via the UPM and it semi fails - the plugin is disabled.
            # The license is entered, and the UPM accepts it.
            # The plugin is enabled and a different error message is generated.

            h3. Steps to Reproduce

            Install Service Desk in the specific order that makes it not work, which is still to be discovered.

            h3. Expected Results

            Service Desk enables successfully.

            h3. Actual Results

            The following stack trace is thrown:

            {noformat}
            2013-10-02 19:21:16,226 ThreadPoolAsyncTaskExecutor::Thread 28 ERROR tcarter 1343x33956x1 n05ov1 99.110.160.171 /rest/plugins/1.0/available/popular [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.servicedesk, config=osgibundle:/META-INF/spring/*.xml))
            org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://142.0:0/META-INF/spring/spring.xml]; nested exception is java.lang.IllegalStateException: Invalid BundleContext.
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
            at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)
            at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)
            at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
            at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
            ...
            Caused by: java.lang.IllegalStateException: Invalid BundleContext.
            at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:365)
            at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:256)
            at org.springframework.osgi.io.internal.resolver.PackageAdminResolver$1.run(PackageAdminResolver.java:178)
            at java.security.AccessController.doPrivileged(Native Method)
            {noformat}

            h3. Workaround

            Increase the plugin start timeout from default 60 seconds to 300 seconds by specifying the startup parameter -Datlassian.plugins.enable.wait=300. For a better description please see Resolution #4 on following page: https://confluence.atlassian.com/display/JIRAKB/JIRA+System+Plugin+Timeout+While+Waiting+for+Plugins+to+Enable

            Restarting JIRA without specifying this parameter has been known to workaround the problem. Please note though that if you don't specify the increased timeout you will likely run into the same problem when you try updating the plugin to a newer version in UPM.
            New: {panel:bgColor=#e7f4fa}
              *NOTE:* This bug report is for *JIRA Service Desk Server*. Using *JIRA Service Desk Cloud*? [See the corresponding bug report|http://jira.atlassian.com/browse/JSDCLOUD-2].
              {panel}

            h3. Summary

            Enabling and installing Service Desk in a certain way is causing it to fail. We believe it is something to do with:

            # Installing via the UPM and it semi fails - the plugin is disabled.
            # The license is entered, and the UPM accepts it.
            # The plugin is enabled and a different error message is generated.

            h3. Steps to Reproduce

            Install Service Desk in the specific order that makes it not work, which is still to be discovered.

            h3. Expected Results

            Service Desk enables successfully.

            h3. Actual Results

            The following stack trace is thrown:

            {noformat}
            2013-10-02 19:21:16,226 ThreadPoolAsyncTaskExecutor::Thread 28 ERROR tcarter 1343x33956x1 n05ov1 99.110.160.171 /rest/plugins/1.0/available/popular [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.servicedesk, config=osgibundle:/META-INF/spring/*.xml))
            org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://142.0:0/META-INF/spring/spring.xml]; nested exception is java.lang.IllegalStateException: Invalid BundleContext.
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
            at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)
            at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)
            at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
            at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
            ...
            Caused by: java.lang.IllegalStateException: Invalid BundleContext.
            at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:365)
            at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:256)
            at org.springframework.osgi.io.internal.resolver.PackageAdminResolver$1.run(PackageAdminResolver.java:178)
            at java.security.AccessController.doPrivileged(Native Method)
            {noformat}

            h3. Workaround

            Increase the plugin start timeout from default 60 seconds to 300 seconds by specifying the startup parameter -Datlassian.plugins.enable.wait=300. For a better description please see Resolution #4 on following page: https://confluence.atlassian.com/display/JIRAKB/JIRA+System+Plugin+Timeout+While+Waiting+for+Plugins+to+Enable

            Restarting JIRA without specifying this parameter has been known to workaround the problem. Please note though that if you don't specify the increased timeout you will likely run into the same problem when you try updating the plugin to a newer version in UPM.
            jonah (Inactive) made changes -
            Link New: This issue relates to JSDCLOUD-2 [ JSDCLOUD-2 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels Original: affects-cloud triaged New: affects-cloud affects-server triaged

              Unassigned Unassigned
              dcurrie@atlassian.com Dave C
              Affected customers:
              3 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: