Yes, it does seem to help, although I still need to try deploying the feature 
in a stand alone Karaf without Pax-Exam.

I may upgrade to 4.0.3 if it comes out soon.

Thanks for the help and best regards,
Alex soto

> On Nov 6, 2015, at 11:32 AM, Jean-Baptiste Onofré <[email protected]> wrote:
> 
> Yes, aligning the two bundles work. But at package level, dependency should 
> help.
> 
> Anyway, I'm releasing 4.0.3 now ;)
> 
> Regards
> JB
> 
> On 11/06/2015 05:29 PM, Christian Schneider wrote:
>> This is a know problem. Karaf and Pax exam both load a bundle containing
>> javax.inject. I solved this for karaf 4.0.3 by simply using the same bundle.
>> So it is only loaded once. I am not sure if dependency=true would help.
>> 
>> In any case the problem is solved in karaf 4.0.3.
>> 
>> Christian
>> 
>> 
>> On 06.11.2015 17:14, Alex Soto wrote:
>>> Hello,
>>> 
>>> I have a problem with @Inject in my integration test  (Karaf 4.0.2 and
>>> Pax-Exam 4.6.0).  Dependencies are not injected.  For example:
>>> 
>>> @Inject
>>> protected BundleContext bundleContext;
>>> 
>>> The problem seems to be caused by one the features being tested, which
>>> includes this bundle:
>>> 
>>> 
>>> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/1_2</bundle>
>>> 
>>> 
>>> This feature contains bundles that also use the @Inject annotation.
>>> If I remove the above /<bundle>/ declaration from my features.xml,
>>> then the problem goes away, but then I need to have this jar deployed
>>> at runtime.  So, which bundle should I be using that contains Inject
>>> and that works with Pax-Exam as well for runtime?
>>> 
>>> Best regards,
>>> 
>>> Alex soto
>>> 
>>> 
>> 
>> 
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> 
>> Open Source Architect
>> http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply via email to