You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Bruno Barin (JIRA)" <ji...@apache.org> on 2013/03/11 14:17:12 UTC
[jira] [Created] (ARIES-1027) Blueprint fails to inject a reference
in a bean constructor when the class does not have a public constructor
Bruno Barin created ARIES-1027:
----------------------------------
Summary: Blueprint fails to inject a reference in a bean constructor when the class does not have a public constructor
Key: ARIES-1027
URL: https://issues.apache.org/jira/browse/ARIES-1027
Project: Aries
Issue Type: Bug
Components: Blueprint
Reporter: Bruno Barin
Suppose you have the following scenario:
public class InjectedBean {
public InjectedBean() {
// do something
}
}
class Bean {
Bean(InjectedBean obj) {
// do something
}
}
and the the blueprint configuration file:
<bean id="injectedBean" class="org.apache.test.InjectBean"/>
<bean id="parentBean" class="org.apache.test.Bean">
<argument ref="injectedBean" />
</bean>
It gives the following exception:
.....
org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.serv
ice.blueprint.container.ComponentDefinitionException: Unable to find a matching
constructor on class org.apache.test.Bean for arguments [org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBe
anHolder@1452cf8] when instanciating bean parentBean
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira