On 29/03/13 12:45 AM, "Chiradeep Vittal" <chiradeep.vit...@citrix.com>
wrote:

>For optional dependencies, JSR330 injection requires using setter
>injection.
>You should write
>
>@Inject void setGslbProvider(GslbProvider provider) {
>  this._gslbProvider = provider;
>}

Thanks Chiradeep for suggestion. But due to Spring default behaviour with
@Inject, both setter and interface injection fails if there is no
implementation. 

For now, I am just initializing through the bean property configured in
componentContext.xml and nonossComponentContext.xml.

>
>
>
>On 3/27/13 8:36 PM, "Murali Reddy" <murali.re...@citrix.com> wrote:
>
>>On 28/03/13 9:00 AM, "Rajesh Battala" <rajesh.batt...@citrix.com> wrote:
>>
>>>Jetty is failing to start on latest master building oss.
>>>Am on the latest master, building oss and starting jetty is failing with
>>>below error. 
>>>
>>>Error creating bean with name 'globalLoadBalancingRulesServiceImpl':
>>>Injection of autowired dependencies failed; nested exception is
>>>org.springframewor
>>>  k.beans.factory.BeanCreationException: Could not autowire field:
>>>protected org.apache.cloudstack.region.
>>>                       gslb.GslbServiceProvider
>>>org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl._g
>>>s
>>>l
>>>bProv                                                          ider;
>>>nested exception is
>>>org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>>>matching b                                                          ean
>>>of type [org.apache.cloudstack.region.gslb.GslbServiceProvider] found
>>>for
>>>dependency: expected at le
>>>          ast 1 bean which qualifies as autowire candidate for this
>>>dependency. Dependency annotations: {@javax.in
>>>                              ject.Inject()}
>>>        at 
>>>org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPost
>>>P
>>>r
>>>ocessor.postProcess
>>>   PropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
>>>        at org.springframe
>>
>>Please pull latest master, I pushed a fix.
>>
>
>


Reply via email to