You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Fairouz Fakhfakh <fa...@gmail.com> on 2012/03/17 02:31:32 UTC

declare Component Instance

Hello,
I have a problem with declaring component instance:
ComponentInstance cannot be resolved to a type

I try to add : import org.osgi.service.component.ComponentInstance;
But Eclipse generates this  error:
The import org.osgi.service.component cannot be resolved

So, can someone help me to resolve this problem?
Thank you for answaring me.
Best regards,

--
Fairouz Fakhfakh

Master Student
National School of Engineers of SFAX

Research group ReDCAD
http://WWW.redcad.org <http://www.redcad.org/>

Re: declare Component Instance

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 17.03.2012 um 02:31 schrieb Fairouz Fakhfakh:

> Hello,
> I have a problem with declaring component instance:
> ComponentInstance cannot be resolved to a type

A ComponentInstance is returned from a ComponentFactory service.

After all, you need to add OSGi Compendium 4.0 (or higher) library as a dependency to your project.

Regards
Felix

> 
> I try to add : import org.osgi.service.component.ComponentInstance;
> But Eclipse generates this  error:
> The import org.osgi.service.component cannot be resolved
> 
> So, can someone help me to resolve this problem?
> Thank you for answaring me.
> Best regards,
> 
> --
> Fairouz Fakhfakh
> 
> Master Student
> National School of Engineers of SFAX
> 
> Research group ReDCAD
> http://WWW.redcad.org <http://www.redcad.org/>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: declare Component Instance

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi,

On Sat, Mar 17, 2012 at 7:01 AM, Fairouz Fakhfakh <
fairouz.fakhfakh@gmail.com> wrote:

> Hello,
> I have a problem with declaring component instance:
> ComponentInstance cannot be resolved to a type
>
> I try to add : import org.osgi.service.component.ComponentInstance;
> But Eclipse generates this  error:
> The import org.osgi.service.component cannot be resolved
>

If your project has a POM, add felix-scr dependency to it and then rebuild.
If you're directly trying in eclipse, download felix-scr dependency and add
it in your project's Java build path!

Hope this helps!


> So, can someone help me to resolve this problem?
> Thank you for answaring me.
> Best regards,
>
> --
> Fairouz Fakhfakh
>
> Master Student
> National School of Engineers of SFAX
>
> Research group ReDCAD
> http://WWW.redcad.org <http://www.redcad.org/>
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Software Engineer,
WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/