I am injecting Interface, made a typo.

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0"; 
name="com.example.MyServiceImpl" immediate="true" activate="activate" 
deactivate="deactivate">
<service>
  <provide interface="com.example.MyService"/>
</service>
<implementation class="com.example.MyServiceImpl"/>
</scr:component>



On Tuesday, 26 February 2019 14:51:41 UTC+1, Toni Menzel wrote:
>
> Is it a type or are you injecting @Inject *Myservice* myService?
> In your component you expose the service as  service = 
> *MyServiceInterface*.class.
>
> Just curious.
>
>
> Toni Menzel
>
> *Developer Ergonomist*
> rebaze consultancy
> Alleestrasse 25 / 30167 Hannover / Germany
> M +49 171 6520284
> www.rebaze.com
>
> rebaze GmbH, Zollstrasse 6, 39114 Hannover, Germany 
> Managing Director: Toni Menzel
> Phone: +49 171 6520284 / E-Mail: [email protected] <javascript:>
> Registration Court: District Court of Stendal
> Registration Number: HRB 17993 
> Sales Tax (VAT) Registration Number: DE282233792
>
>
>
> On Tue, Feb 26, 2019 at 2:19 PM <[email protected] <javascript:>> 
> wrote:
>
>> Hello to all!
>>
>> Recently I have encountered some problem with writing integration test 
>> for my OSGi DS,. Spent 3 days searching the solution - pointless.
>>
>> I would be really appreciated if you can point me what I am doing wrong. 
>>
>> The error I get in terminal is the following:
>>
>>
>>    - org.ops4j.pax.swissbox.tracker.ServiceLookupException: gave up 
>>    waiting for service
>>    
>> Here below is the Karaf error log. 
>>
>> Until Now there is nothing special inside my Pax exam, and I get this 
>> error when I just try to inject the service -> @Inject Myservice myService, 
>> *and *if my service is set immediate=true:
>>
>>    - @Component( service = MyServiceInterface.class, immediate = true)
>>
>> If I remove immediate = true, injection works fine, but as per project 
>> this component should be immediate. In my Karaf custom distribution the 
>> Service is recognised without problem and is functional.  
>>
>>
>> I attached my Pax-Exam error log and maven-bundle plugin configuration
>>
>>
>>  
>>
>>
>> Waiting for any kind reply
>>
>> -- 
>> -- 
>> ------------------
>> OPS4J - http://www.ops4j.org - [email protected] <javascript:>
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to