2 Replies Latest reply on Aug 17, 2012 8:48 AM by Claus Ibsen

    Exception org.apache.camel.NoSuchBeanException thrown while stopping bundle

    Justas S Newbie



        it seems, that the order of defining beans in spring matters. With the following configuration, when the bundle is being stopped, I got exception:


      Could not unregister error handler: org.apache.camel.management.mbean.ManagedErrorHandler@427a0b as ErrorHandler MBean.

      org.apache.camel.NoSuchBeanException: Cannot lookup: testErrorHandler from registry: org.apache.camel.spring.spi.ApplicationContextRegistry@b1e15c with expec- 2.9.

      ted type: interface org.apache.camel.builder.ErrorHandlerBuilder due: Error creating bean with name 'testErrorHandler': Singleton bean creation not allowed w

      hile the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) 


      Spring context:





      Is it a bug? There were no issues with previous version (apache-servicemix-4.3.1-fuse).


      Tested with fuse-esb-7.0.0.fuse-061