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.

atlassian.com | 3 months ago
  1. 0

    [JSD-2] Service Desk fails to enable due to Invalid BundleContext - Atlassian JIRA

    atlassian.com | 1 year ago
    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.
  2. 0

    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.

    Atlassian JIRA | 3 years ago | David Currie [Atlassian]
    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.
  3. 0

    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.

    Atlassian JIRA | 3 years ago | David Currie [Atlassian]
    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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Service Desk fails to enable due to Invalid BundleContext - JIRA Service Desk Knowledge Base - Atlassian Documentation

    atlassian.com | 3 months ago
    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.
  6. 0

    Crucible 2.7.9 Simple REST Plugin throws an Error getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String; - Atlassian Answers

    atlassian.com | 7 months ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://58.0:0/META-INF/spring/crucible-plugin-config.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;

  1. andyglick 20 times, last 3 months ago
  2. Bugger 1 times, last 8 months ago
27 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Spring Beans
    AbstractBeanDefinitionReader.loadBeanDefinitions
    1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
    2. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    3. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    4. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    5. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    6. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    6 frames
  3. Spring OSGi Core
    OsgiBundleXmlApplicationContext.loadBeanDefinitions
    1. org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)
    2. org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)
    2 frames
  4. Spring Context
    AbstractApplicationContext.obtainFreshBeanFactory
    1. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    2. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
    2 frames