For optional dependencies, JSR330 injection requires using setter injection. You should write
@Inject void setGslbProvider(GslbProvider provider) { this._gslbProvider = provider; } 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._gs >>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.AutowiredAnnotationBeanPostP >>r >>ocessor.postProcess >> PropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) >> at org.springframe > >Please pull latest master, I pushed a fix. >