Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 19015 invoked from network); 31 Jul 2007 13:14:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2007 13:14:34 -0000 Received: (qmail 55611 invoked by uid 500); 31 Jul 2007 13:14:34 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 55372 invoked by uid 500); 31 Jul 2007 13:14:33 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 55363 invoked by uid 99); 31 Jul 2007 13:14:33 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 06:14:33 -0700 X-ASF-Spam-Status: No, hits=1.7 required=10.0 tests=FH_MSGID_01C67,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.202.165.12] (HELO smtpout08.prod.mesa1.secureserver.net) (64.202.165.12) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 31 Jul 2007 13:14:28 +0000 Received: (qmail 10147 invoked from network); 31 Jul 2007 13:14:07 -0000 Received: from unknown (65.170.189.30) by smtpout08-04.prod.mesa1.secureserver.net (64.202.165.12) with ESMTP; 31 Jul 2007 13:14:06 -0000 From: "Devajyoti Chakraborty" To: References: <01c501c7cd5e$aa79d700$ff6d8500$@com> <1185880490.7274.91.camel@bslm-046.corp.day.com> In-Reply-To: <1185880490.7274.91.camel@bslm-046.corp.day.com> Subject: RE: Issue with Apache Felix Declarative Service Date: Tue, 31 Jul 2007 09:13:55 -0400 Message-ID: <000001c7d374$a64cb320$f2e61960$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcfTZBcICEoRosq1T0q9fF1hf4/c6gAD0SSQ Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org Felix, Thanks a lot for your explanation, I was a little confused as to how OSGi resolves import packages if the package has been exported by two different bundles. One way of resolving the same could be using version detail, but is there an algorithm by which the bundle would select packages provided they have been exported by two bundles with no distinguishing element. In such cases how does OSGi arrange the order of preference for the bundle exporting the same package? As for my problem, we found that we hadn't imported ComponentContext package in the manifest file. By the way, I am curious to ask, what kind of debugging strategy can be adopted for OSGi? Because at times the bundles don't get deployed, but doesn't provide more information as to the reason why? Though it shows that there was an Error Event generated while starting the bundle. Best Regards, Dev -----Original Message----- From: Felix Meschberger [mailto:fmeschbe@gmail.com] Sent: Tuesday, July 31, 2007 7:15 AM To: dev@felix.apache.org Subject: Re: Issue with Apache Felix Declarative Service Hi Dev, > 1) My services bundle get deployed with status Active yet "services" > command from OSGi prompt, doesn't show me my service. My bundle was tested > within Eclipse Equinox and it worked correctly and also displayed my > services. This is quite normal behaviour. Depending on your service declaration, the Declarative Services Runtime (SCR) might not start your service due to some services references which cannot be satisfied. > Since I am using the preference services I have to use the > "org.osgi.compendium-0.9.0-incubator-SNAPSHOT" bundle and in order to use > declarative services I am using the > "org.apache.felix.scr-0.9.0-incubator-SNAPSHOT " bundle. I assume that > since the same packages are being exported by two bundles it's a potential > problem. This is one of the great things about OSGi :-) Multiple bundles may provide the same packages (to not create needless dependencies) and the framework will then decide which packages to actually use. In your case the framework might decide to create wires for the org.osgi.service.component package to the osg.osgi.componendium bundle and not to use the same package from the scr o.a.felix.bundle at all. In short, it is the task of the OSGi framework to resolve these collissions and frameworks are very good at that :-) > Can someone help me out with the issue as to why I am unable to run the > declarative service bundle inside Felix? As I said earlier, this might be due to an unsatisfied service requirement of your declared component. Hope this helps. Regards Felix