Hi Sinthuja and Mahesh, That was the exact reason. Thank you very much. There actually is a try-catch block, but in my case it is a NPE.
Thanks, Bhathiya On Thu, May 7, 2015 at 8:39 PM, Mahesh Chinthaka <mahe...@wso2.com> wrote: > Hi Bhathiya, > > I came across similar kind of a issue and found out that it was due to > some missing constraints( some dependancy jars were missing, actually they > were unavailable in osgi environment). > Therefore this particular osgi bundle's activation gets failed and it > retries. > > You can find the exact reason by catching throwable and printing stack > trace in your activate method of the service component. And fix that, then > the bundle will get activated for sure :) > > On Thu, May 7, 2015 at 7:32 PM, Sinthuja Ragendran <sinth...@wso2.com> > wrote: > >> Hi, >> >> AFAIR this happens if any uncaught exception thrown during the bundle >> activate method. Try to catch with throwable and see whether you are >> getting any sort of runtime exceptions. >> >> Thanks, >> Sinthuja >> >> On Thu, May 7, 2015 at 6:59 PM, Bhathiya Jayasekara <bhath...@wso2.com> >> wrote: >> >>> Hi all, >>> >>> I'm facing this situation where the activate method of an OSGi bundle[1] >>> is called many times. As you can see in below OSGi console output, the >>> service, that the bundle exposes, is also registered many times. What >>> should be the reason for this strange behavior? >>> >>> osgi> ss forum >>> "Framework is launched." >>> >>> id State Bundle >>> 229 ACTIVE org.wso2.carbon.forum_1.2.0.SNAPSHOT >>> osgi> >>> osgi> >>> osgi> b 229 >>> org.wso2.carbon.forum_1.2.0.SNAPSHOT [229] >>> Id=229, Status=ACTIVE Data >>> Root=/home/bhathiya/git/product-apim/modules/distribution/product/target/wso2am-1.9.0-SNAPSHOT/repository/components/default/configuration/org.eclipse.osgi/bundles/229/data >>> "Registered Services" >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=146} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=148} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=150} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=152} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=154} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=156} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=159} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=161} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=163} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=165} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=167} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=169} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=171} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=173} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=175} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=177} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=179} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=181} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=183} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=185} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=186} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=188} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=190} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=192} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=194} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=195} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=197} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=199} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=201} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=203} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=204} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=206} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=207} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=208} >>> {org.wso2.carbon.utils.Axis2ConfigurationContextObserver}={ >>> service.id=302} >>> No services in use. >>> Exported packages >>> org.wso2.carbon.forum; version="0.0.0"[exported] >>> org.wso2.carbon.forum.dto; version="0.0.0"[exported] >>> org.wso2.carbon.forum.registry; version="0.0.0"[exported] >>> Imported packages >>> javax.xml.namespace; >>> version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]> >>> org.apache.axis2.context; >>> version="1.6.1.wso2v10"<axis2_1.6.1.wso2v10 [13]> >>> org.apache.commons.logging; >>> version="1.1.1"<org.wso2.carbon.logging_4.2.0 [295]> >>> org.osgi.framework; >>> version="1.7.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]> >>> org.osgi.service.component; >>> version="1.2.0"<org.eclipse.osgi.services_3.3.100.v20120522-1822 [133]> >>> org.wso2.carbon.context; version="4.2.0"<org.wso2.carbon.utils_4.2.0 >>> [462]> >>> org.wso2.carbon.governance.api.exception; >>> version="4.2.2"<org.wso2.carbon.governance.api_4.2.2 [232]> >>> org.wso2.carbon.governance.api.generic; >>> version="4.2.2"<org.wso2.carbon.governance.api_4.2.2 [232]> >>> org.wso2.carbon.governance.api.generic.dataobjects; >>> version="4.2.2"<org.wso2.carbon.governance.api_4.2.2 [232]> >>> org.wso2.carbon.governance.api.util; >>> version="4.2.2"<org.wso2.carbon.governance.api_4.2.2 [232]> >>> org.wso2.carbon.registry.core; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.config; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.exceptions; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.jdbc.realm; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.pagination; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.service; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.session; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.registry.core.utils; >>> version="1.0.1"<org.wso2.carbon.registry.core_4.2.0 [355]> >>> org.wso2.carbon.user.api; >>> version="1.0.1"<org.wso2.carbon.user.api_4.2.0 [456]> >>> org.wso2.carbon.user.core; >>> version="4.2.0"<org.wso2.carbon.user.core_4.2.0 [457]> >>> org.wso2.carbon.user.core.service; >>> version="4.2.0"<org.wso2.carbon.user.core_4.2.0 [457]> >>> org.wso2.carbon.user.core.tenant; >>> version="4.2.0"<org.wso2.carbon.user.core_4.2.0 [457]> >>> org.wso2.carbon.utils; version="4.2.0"<org.wso2.carbon.utils_4.2.0 >>> [462]> >>> org.wso2.carbon.utils.multitenancy; >>> version="4.2.0"<org.wso2.carbon.utils_4.2.0 [462]> >>> No fragment bundles >>> Named class space >>> org.wso2.carbon.forum; bundle-version="1.2.0.SNAPSHOT"[provided] >>> No required bundles >>> >>> >>> >>> Appreciate some help on this. >>> >>> [1] https://github.com/wso2/carbon-apimgt/tree/master/components/forum >>> >>> Thanks, >>> Bhathiya >>> -- >>> *Bhathiya Jayasekara* >>> *Senior Software Engineer,* >>> *WSO2 inc., http://wso2.com <http://wso2.com>* >>> >>> *Phone: +94715478185 <%2B94715478185>* >>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >>> <http://www.linkedin.com/in/bhathiyaj>* >>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >>> *Blog: http://movingaheadblog.blogspot.com >>> <http://movingaheadblog.blogspot.com/>* >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Sinthuja Rajendran* >> Associate Technical Lead >> WSO2, Inc.:http://wso2.com >> >> Blog: http://sinthu-rajan.blogspot.com/ >> Mobile: +94774273955 >> >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Mahesh Chinthaka Vidanagama* | Software Engineer > WSO2, Inc | lean. enterprise. middleware. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 71 63 63 083 | Work: +94 112 145 345 > Email: mahe...@wso2.com | Web: www.wso2.com > -- *Bhathiya Jayasekara* *Senior Software Engineer,* *WSO2 inc., http://wso2.com <http://wso2.com>* *Phone: +94715478185* *LinkedIn: http://www.linkedin.com/in/bhathiyaj <http://www.linkedin.com/in/bhathiyaj>* *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* *Blog: http://movingaheadblog.blogspot.com <http://movingaheadblog.blogspot.com/>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev