I have been using pax-exam (versions 2.3 and 2.4) launching tests from Eclipse for several months. Now I want to export my dependencies and then run tests from a command shell. When I launch my tests, I get the following error:

java.lang.NoClassDefFoundError: org/ops4j/pax/exam/spi/container/TestContainerFactory at org.ops4j.pax.exam.runtime.PaxExamRuntime.getTestContainerFactory(PaxExamRuntime.java:47) at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:136)

I see in PaxExamRuntime's source code that it is trying to do a Service lookup on an interface (org.ops4j.pax.exam.spi.container.TestContainerFactory) that is inconsistent with the interfaces the containers register (org.ops4j.pax.exam.TestContainerFactory).

Also, I notice when launching from Eclipse that a different PaxExamRuntime (org.ops4j.pax.exam.spi.PaxExamRuntime) is loaded. This version (correctly it seems) looks up interfact org.ops4j.pax.exam.TestContainerFactory, and so it succeeds.

Thoughts?  TIA.

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to