[ 
https://issues.apache.org/jira/browse/ARIES-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bruno Barin updated ARIES-1027:
-------------------------------

    Summary: Blueprint fails to inject a reference in a bean constructor when 
the class has 'package' visibility  (was: Blueprint fails to inject a reference 
in a bean constructor when the class does not have a public constructor)
    
> Blueprint fails to inject a reference in a bean constructor when the class 
> has 'package' visibility
> ---------------------------------------------------------------------------------------------------
>
>                 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

Reply via email to