Announcement Announcement Module
No announcement yet.
Required 'bundleContext' property was not set. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Required 'bundleContext' property was not set.

    I am also encountering the above error message when running a webapp that uses an <osgi:reference/> element.

    First here is the stack trace:
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at AbstractOsgiServiceImportFactoryBean.afterProperti esSet( )
    at AbstractServiceImporterProxyFactoryBean.afterPrope rtiesSet(AbstractServiceImporterProxyFactoryBean.j ava:52)
    at OsgiServiceProxyFactoryBean.afterPropertiesSet(Osg
    at AutowireCapableBeanFactory.invokeInitMethods(Abstr
    at AutowireCapableBeanFactory.initializeBean(Abstract
    at AutowireCapableBeanFactory.doCreateBean(AbstractAu
    at AutowireCapableBeanFactory.createBean(AbstractAuto
    at BeanFactory$1.getObject( 90)
    at ingletonBeanRegistry.getSingleton(DefaultSingleton
    at BeanFactory.doGetBean( )
    at BeanFactory.getBean(
    at istableBeanFactory.preInstantiateSingletons(Defaul
    at ationContext.finishBeanFactoryInitialization(Abstr
    at ationContext.refresh(AbstractApplicationContext.ja va:416)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 43)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 59)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext( )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(
    at it(
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)

    I have configured the "contextClass" parameter in web.xml to the value " lWebApplicationContext". By debugging I noticed that the BundleContextAwareProcessor processes one instance of the OsgiServiceProxyFactoryBean and sets its bundle context, however multiple instances of OsgiServiceProxyFactoryBean are being created (all with the same bean name) and only one is processed by BundleContextAwareProcessor. One of the other instances is used when the application is executed from the browser.

    Last edited by njbartlett; Jun 7th, 2010, 10:53 AM. Reason: reformat stack trace