Are you importing org.ops4j.pax.exam.Inject ? If yes, then try javax.inject.Inject
>>> Benson Margulies <[email protected]> 07.12.2015 21:32 >>> I am trying to use @Inject in a pax-exam test. pax-exam uses <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-atinject_1.0_spec</artifactId> <version>${dependency.atinject.version}</version> </dependency> Karaf 4 uses the alternative from servicemix. When I use the karaf container to test, I end up with both. And, as luck would have it, pax-exam ends up with Inject.class from the servicemix bundle, while my test ends up with it from the geronimo bundle. I don't know how the geronimo bundle gets itself provisioned; but I assume that pax-exam is arranging this somehow. anyway, is there any OSGi header i can use to encourage my test bundle to wire to the servicemix bundle? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

