Seems to me that you have the opposite in your bean declaration. "FooImpl has a constructor with a single argument takning the Bar interface".
----- Original Message ----- From: "Freeman Fang" <[email protected]> To: [email protected] Sent: Friday, October 31, 2014 3:44:05 AM Subject: Re: Blueprint bean error on startup Hi, Are you sure "BarImpl has a constructor with a single argument taking the Foo interface", your blueprint file doesn't match this. ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat On 2014-10-30, at 下午4:32, Marcus Bond wrote: Hi, I have the following beans declared in a blueprint config and I am having receiving error org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching constructor on class uk.co.marcusbond.FooImpl for arguments [org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@169e5808] <bean class="uk.co.marcusbond.BarImpl" id="bar" /> <bean class="uk.co.marcusbond.FooImpl" id="foo"> <argument ref="bar" /> </bean> FooImpl implements interface Foo and BarImpl has a constructor with a single argument taking the Foo interface (dependency on interface not implementation) yet I get the above error and when listed the feature / bundle is shown in state Failure. Another oddity is that this only happens on karaf startup, if I add a bundle:watch and then rebuild the relevant bundle exactly the same the change is picked up and the bundle installed correctly (Active). Is this a bug or a problem with the configuration? Regards, Marcus.
