Hi, Adding <scope>provided</scope> solved the issue. Thanks Melan for offline support
On Fri, Dec 6, 2013 at 11:46 AM, Nirmal Fernando <nir...@wso2.com> wrote: > Udara, > > You need to use following dependency: > > <dependency> > <groupId>org.wso2.carbon</groupId> > <artifactId>org.wso2.carbon.core</artifactId> > </dependency> > > > On Fri, Dec 6, 2013 at 9:28 PM, Udara Liyanage <ud...@wso2.com> wrote: > >> Hi, >> >> I added the following in order to use registry service to a component. >> However the activate() is not getting called. >> >> * @scr.component name="org.apache.stratos.autoscaler" immediate="true" >> * @scr.reference name="registry.service" >> * interface= >> * "org.wso2.carbon.registry.core.service.RegistryService" >> * cardinality="1..1" policy="dynamic" >> bind="setRegistryService" >> * unbind="unsetRegistryService" >> */ >> >> >> When I debug from the OSGI console is says "*No instances were created >> because: Method [setRegistryService] was not found in class ". * >> org.apache.stratos.autoscaler.internal.AutoscalerServerComponent" >> >> However I have that method in the file. What may be the cause? >> >> *protected void setRegistryService(RegistryService registryService)* >> >> >> osgi> ls -c 50 >> Components in bundle org.apache.stratos.autoscaler: >> ID Component details >> 1 Component[ >> name = org.apache.stratos.autoscaler >> factory = null >> autoenable = true >> immediate = true >> implementation = >> org.apache.stratos.autoscaler.internal.AutoscalerServerComponent >> state = Unsatisfied >> properties = {service.pid=org.apache.stratos.autoscaler} >> serviceFactory = false >> serviceInterface = null >> references = { >> Reference[name = registry.service, interface = >> org.wso2.carbon.registry.core.service.RegistryService, policy = dynamic, >> cardinality = 1..1, target = null, bind = setRegistryService, unbind = >> unsetRegistryService] >> } >> located in bundle = org.apache.stratos.autoscaler_4.0.0.SNAPSHOT [50] >> ] >> Dynamic information : >> The component is satisfied >> All component references are satisfied >> Component configurations : >> Configuration properties: >> service.pid = org.apache.stratos.autoscaler >> component.name = org.apache.stratos.autoscaler >> component.id = 0 >> Instances: >> * No instances were created because: Method [setRegistryService] was >> not found in class >> org.apache.stratos.autoscaler.internal.AutoscalerServerComponent* >> >> >> >> >> -- >> Udara Liyanage >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> >> web: http://udaraliyanage.wordpress.com >> phone: +94 71 443 6897 >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > Thanks & regards, > Nirmal > > Senior Software Engineer- Platform Technologies Team, WSO2 Inc. > Mobile: +94715779733 > Blog: http://nirmalfdo.blogspot.com/ > > -- Udara Liyanage Software Engineer WSO2, Inc.: http://wso2.com lean. enterprise. middleware web: http://udaraliyanage.wordpress.com phone: +94 71 443 6897
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev