From users-return-12072-apmail-felix-users-archive=felix.apache.org@felix.apache.org Wed Mar 7 07:56:13 2012 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 DDFE891FF for ; Wed, 7 Mar 2012 07:56:13 +0000 (UTC) Received: (qmail 75897 invoked by uid 500); 7 Mar 2012 07:56:13 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 75689 invoked by uid 500); 7 Mar 2012 07:56:09 -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 75659 invoked by uid 99); 7 Mar 2012 07:56:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 07:56:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clement.escoffier@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; Wed, 07 Mar 2012 07:56:02 +0000 Received: by werp11 with SMTP id p11so5090522wer.22 for ; Tue, 06 Mar 2012 23:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=OzwTRx5Iijhdg28Pg0wC0EYAv5LOuSkWu7lW6kJUcQA=; b=jYoRo55nTBIl0s8ZyASpwz1CmEqnVsuOevIUk8Cc0/3Kd09a97UZqPJz8wutpA1Y8V yooOgClFqXZPbmJ+fzNUBlIF6oGVQjlFmmBjb6F6Xj/obPS5/fyDNHCGcdAq63bSaUwi LILcpFT3rmuYI4KAYkJ46z5fStxxaatOCgtKVMuIJxnr4GG6LHbUHbhhspzcYYDedfSW BGvYT/Mo3wbqBh0jU77meWYwlKdYpxKMhPSBPwACdkc0GqtzjRoHPmAketG3aNN7gsFx IsY5L5AFxxQfDUdfq8nNSLQ8o7cJq39SDEnjbQbEDp9L2h5MtB/hqMwo1Cg5SQXSDsYq +Zpg== Received: by 10.216.136.232 with SMTP id w82mr428654wei.119.1331106940763; Tue, 06 Mar 2012 23:55:40 -0800 (PST) Received: from [192.168.1.44] (sdo26-1-78-245-149-94.fbx.proxad.net. [78.245.149.94]) by mx.google.com with ESMTPS id hn8sm91381070wib.11.2012.03.06.23.55.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Mar 2012 23:55:39 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: Embedded Felix & iPojo From: Clement Escoffier In-Reply-To: <4F568418.6070400@gmail.com> Date: Wed, 7 Mar 2012 08:55:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <4F568418.6070400@gmail.com> To: users@felix.apache.org X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 06.03.2012, at 22:39, Pierre-Gildas MILLON wrote: > Hi there, >=20 > I did add some packages to the FRAMEWORK_SYSTEMPACKAGES_EXTRA (the = org.osgi.compendium bundle was missing). >=20 > Now my problem has evolved to the following : > [WARNING] IPOJO-Extender : Type of component not available: component It's just a timing issue. A component type is declared before the actual = support for this type. Once the support is started, it will manage it as = expected.=20 Before getting the service be sure to 'wait'/'listen' enough time to let = iPOJO finishes the startup process. Regards, Clement >=20 > The Arch Bundle throws the same warning... >=20 > Regards, >=20 > Pierre-Gildas >=20 > Le 06/03/2012 08:48, Pierre-Gildas MILLON a =E9crit : >> Hi, >>=20 >> 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. >>=20 >> Regards, >>=20 >> Pierre-Gildas >>=20 >> Le 6 mars 2012 08:43, Clement Escoffier > a =E9crit : >>=20 >> Hi, >>=20 >> Did you try to add a @Validate method to check if the service >> object is created ? >>=20 >> @Validate >> public void start() { >> System.out.println("starting=85"); >> } >>=20 >> Moreover you can use the 'arch' command to check if the service is >> registered. >>=20 >> Regards, >>=20 >> Clement >>=20 >>=20 >> On 05.03.2012, at 19:46, Pierre-Gildas MILLON wrote: >>=20 >> > 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 =E9crit : >> >> Hi, >> >> >> >> Not much luck with that... >> >> >> >> Regards, >> >> >> >> Pierre-Gildas >> >> >> >> Le 04/03/2012 19:30, Clement Escoffier a =E9crit : >> >>> 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 =3D >> ctx.getServiceReference(Service.class); >> >>>> Service myService =3D 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 =E9crit : >> >>>>> 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 >> >> > >>=20 >>=20 >> = --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org >> >> For additional commands, e-mail: users-help@felix.apache.org >> >>=20 >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org