See also FAQ 1.x for questions related to Pax Exam 1.x.

My test blocks or times out. What can I do?

Make sure that all provisioned bundles are ACTIVE and all required services are registered. To do so, change your configuration to enable an OSGI console. The details of this depend on your OSGi framework.

My test works in the Pax Runner Container but not in the Native Container

With the Native Container, your tests run in the same VM as the Pax Exam driver. Thus, Pax Exam classes and any other classpath dependencies are visible to the system classloader. The OSGi framework may or may try to limit the scope of the parent classloader of bundle classloaders, but even when it does so, bundles in your system under test may thwart the intention of the framework to isolate itself by directly accessing the system classloader.

There is not much Pax Exam can do about this. See the discussion in PAXEXAM-249.

Why does the Java debugger not stop at a breakpoint I set in my Pax Exam JUnit test?

When working with the Pax Runner container, you are dealing with two Java VM processes, one running the test driver, and one running the OSGi framework. The execution flow of your JUnit class is actually split between the two VMs, and the bodies of your test methods are executed on the remote VM.

So you need to enable remote debugging for the spawned VM using a vmOption() in your @Configuration method, e.g.


Why does Pax Exam ignore my logging configuration?

Pax Exam uses Pax Logging by default. If you have your own logging bundles in your system under test, you may not get what you expect. See Logging Configuration for more details.

How can I provision bundles directly from my IDE workspace?

Provisioning exploded (i.e. unzipped) bundles is planned for Pax Exam 2.3.0 using the new reference: protocol from Pax URL.