Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2AD39BDE for ; Tue, 6 Mar 2012 21:40:07 +0000 (UTC) Received: (qmail 50264 invoked by uid 500); 6 Mar 2012 21:40:07 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 50222 invoked by uid 500); 6 Mar 2012 21:40:07 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 50212 invoked by uid 99); 6 Mar 2012 21:40:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 21:40:07 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pg.millon@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-we0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 21:39:59 +0000 Received: by werp11 with SMTP id p11so4755582wer.22 for ; Tue, 06 Mar 2012 13:39:39 -0800 (PST) Received-SPF: pass (google.com: domain of pg.millon@gmail.com designates 10.216.131.24 as permitted sender) client-ip=10.216.131.24; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pg.millon@gmail.com designates 10.216.131.24 as permitted sender) smtp.mail=pg.millon@gmail.com; dkim=pass header.i=pg.millon@gmail.com Received: from mr.google.com ([10.216.131.24]) by 10.216.131.24 with SMTP id l24mr7006395wei.76.1331069979041 (num_hops = 1); Tue, 06 Mar 2012 13:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=AsNu/obS/Eaojy/qB4wOpIW3K7ylcvVjO3qwfELDN+U=; b=XC3lEjTVKLhMvj5L+dMAN9J5WDH5n/TOnZmmsmW+QSi85KHUmRwQnzWQPGhhO6HSa+ pEoq9e8sDo40hZcmod9TdpIGbGNkBzcVYggvUe3YijJEcEkoszIVy0CQY4u8vDmbq1yA lLpNBJbeQzsgjs0JrE3jUUZKIdHsLsE3l06Zk2DDlXTbe4qT6eF0py7IJAF8xZa8cwcn Yzq6JtQwofODYxw/LClFOJFg3Jg1evTQmO09zwJZsjZCV+1eq9LUaM5VCC78WX9cEch6 PmKvxz7Qgv14mNBzCsH5y41HxwqXw1TUUNHQ/vRjj86ywEAcrTfh+grYIVXGU8abN5/a 76HA== Received: by 10.216.131.24 with SMTP id l24mr5623096wei.76.1331069978931; Tue, 06 Mar 2012 13:39:38 -0800 (PST) Received: from [192.168.1.144] ([78.219.80.98]) by mx.google.com with ESMTPS id ep17sm29980462wid.2.2012.03.06.13.39.37 (version=SSLv3 cipher=OTHER); Tue, 06 Mar 2012 13:39:37 -0800 (PST) Message-ID: <4F568418.6070400@gmail.com> Date: Tue, 06 Mar 2012 22:39:36 +0100 From: Pierre-Gildas MILLON User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: users@felix.apache.org Subject: Re: Embedded Felix & iPojo References: <1CBE5CDF-D7CB-4073-BBAB-3017DB357E30@gmail.com> <4F53A206.3090202@gmail.com> <0BE52078-209E-4C70-B4FE-585BEF36F338@gmail.com> <4F53E6FD.1050706@gmail.com> <4F550A14.2060105@gmail.com> <80F4C7DF-6000-4D0C-ACFA-A8E94F2BECC5@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------010508040605050705070707" X-Virus-Checked: Checked by ClamAV on apache.org --------------010508040605050705070707 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Hi there, I did add some packages to the FRAMEWORK_SYSTEMPACKAGES_EXTRA (the org.osgi.compendium bundle was missing). Now my problem has evolved to the following : [WARNING] IPOJO-Extender : Type of component not available: component The Arch Bundle throws the same warning... Regards, Pierre-Gildas Le 06/03/2012 08:48, Pierre-Gildas MILLON a �crit : > Hi, > > Thanks for your answer but I think I might have found a way out of this :) > I tried to declare a service from scratch: using Declarative Services > then iPojo and at last iPojo Annotations. > Which lead me to a working bundle (I understood that the annotations > were only used to generate content for the MANIFEST by the way). > Now, when I try to add this bundle into my embedded Felix I've got > various errors of unresolved packages. > So, tonight I'll try to reconfigure the FRAMEWORK_SYSTEMPACKAGES_EXTRA > variables and let you know how it ended. > > Regards, > > Pierre-Gildas > > Le 6 mars 2012 08:43, Clement Escoffier > a �crit : > > Hi, > > Did you try to add a @Validate method to check if the service > object is created ? > > @Validate > public void start() { > System.out.println("starting�"); > } > > Moreover you can use the 'arch' command to check if the service is > registered. > > Regards, > > Clement > > > On 05.03.2012, at 19:46, Pierre-Gildas MILLON wrote: > > > Hi, > > > > I continue to try many things but I stiil fail to make that works... > > The iPojo activator (Extender) seems to be well started but it > doesn't initialize the service :/ > > > > Le 04/03/2012 23:04, Pierre-Gildas MILLON a �crit : > >> Hi, > >> > >> Not much luck with that... > >> > >> Regards, > >> > >> Pierre-Gildas > >> > >> Le 04/03/2012 19:30, Clement Escoffier a �crit : > >>> Hi, > >>> > >>> Try to add the Service class package to > Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA. > >>> You need to ensure that it uses the same class inside and > outside the framework. > >>> > >>> Regards, > >>> > >>> Clement > >>> > >>> On 04.03.2012, at 18:10, Pierre-Gildas MILLON wrote: > >>> > >>>> Hi Clement, > >>>> > >>>> Thanks for your quick answer but it does not solve the problem... > >>>> > >>>> Nothing on the console and when I try to get an instance of > my service through the API: > >>>> > >>>> ServiceReference< Service> serviceRef = > ctx.getServiceReference(Service.class); > >>>> Service myService = ctx.getService(serviceRef); > >>>> > >>>> I've got a NPE: > >>>> > >>>> java.lang.NullPointerException: Specified service reference > cannot be null. > >>>> > >>>> :/ > >>>> > >>>> Le 04/03/2012 17:59, Clement Escoffier a �crit : > >>>>> Hi, > >>>>> > >>>>> Add @Instantiate to your component class to instruct iPOJO > to create an instance of your component: > >>>>> @Component > >>>>> @Provides > >>>>> @Instantiate > >>>>> public class ServiceImpl implements Service { > >>>>> > >>>>> > >>>>> Regards, > >>>>> > >>>>> Clement > >>>>> > >>>>> On 04.03.2012, at 17:20, Pierre-Gildas MILLON wrote: > >>>>> > >>>>>> Hi People, > >>>>>> > >>>>>> I try to use iPojo in a Maven project that embed Felix. > >>>>>> > >>>>>> I've followed the guidelines to embed Felix in an app and > my simple bundle > >>>>>> that prints Hello World from the activator works fine. > >>>>>> > >>>>>> Now I'd like to use iPojo to publish a service from my > bundle (more > >>>>>> interesting than printing Hello World). > >>>>>> I'm using the annotations following the "Getting Started" > from the iPojo > >>>>>> website. > >>>>>> But me service doesn't seem to be published. > >>>>>> > >>>>>> If someone could help me, it's rather confusing. > >>>>>> > >>>>>> The code is available : > >>>>>> https://gist.github.com/7bfc30226c6b1acad5e5 > >>>>>> > >>>>>> Regards, > >>> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > > > For additional commands, e-mail: users-help@felix.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > > For additional commands, e-mail: users-help@felix.apache.org > > > --------------010508040605050705070707--